From 4852d3818866d5291cad73fdd4d382d2dedd1338 Mon Sep 17 00:00:00 2001 From: peadar Date: Mon, 20 Dec 2004 10:48:48 +0000 Subject: 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@ --- etc/rc.d/named | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'etc') diff --git a/etc/rc.d/named b/etc/rc.d/named index 9746f9d..0163cb0 100755 --- a/etc/rc.d/named +++ b/etc/rc.d/named @@ -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 -- cgit v1.1