diff options
author | peadar <peadar@FreeBSD.org> | 2004-12-20 10:48:48 +0000 |
---|---|---|
committer | peadar <peadar@FreeBSD.org> | 2004-12-20 10:48:48 +0000 |
commit | 4852d3818866d5291cad73fdd4d382d2dedd1338 (patch) | |
tree | f5b7d06021d0f79df9419dd7b12320a8b481ff39 | |
parent | ccf722108f25d85d65ec4732405ab51fb1991b9e (diff) | |
download | FreeBSD-src-4852d3818866d5291cad73fdd4d382d2dedd1338.zip FreeBSD-src-4852d3818866d5291cad73fdd4d382d2dedd1338.tar.gz |
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@
-rwxr-xr-x | etc/rc.d/named | 8 |
1 files changed, 8 insertions, 0 deletions
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 |