When stopping a chrooted named, unmount the devfs filesystem from

the chroot area. This stops "umount -a" failing when dropping to
single user.

Reviewed by:	dougb@
This commit is contained in:
peadar 2004-12-20 10:48:48 +00:00
parent ccf722108f
commit 4852d38188

View File

@ -14,6 +14,7 @@ name="named"
rcvar=`set_rcvar`
start_precmd="named_precmd"
start_postcmd="make_symlinks"
stop_postcmd="named_poststop"
required_dirs="$named_chrootdir" # if it is set, it must exist
extra_commands="reload"
@ -81,6 +82,13 @@ make_symlinks()
ln -fs "${named_chrootdir}${pidfile}" ${pidfile}
}
named_poststop()
{
if [ -n "${named_chrootdir}" -a -c ${named_chrootdir}/dev/null ]; then
umount ${named_chrootdir}/dev 2>/dev/null || true
fi
}
named_precmd()
{
local confgen_chroot