summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-11-22 04:23:11 +0000
committerdillon <dillon@FreeBSD.org>1999-11-22 04:23:11 +0000
commite8e6885c6b0dee9c5ecf9f433c1eeac5cc116a51 (patch)
treedb8aaaa6673d31f85b8712d63eb284e6fb9ce007 /etc
parentdadd809c39e5c694c3b2ecf910e3b181cea21530 (diff)
downloadFreeBSD-src-e8e6885c6b0dee9c5ecf9f433c1eeac5cc116a51.zip
FreeBSD-src-e8e6885c6b0dee9c5ecf9f433c1eeac5cc116a51.tar.gz
Finish up umntall support. init now passed an argument to the
rundown script 'reboot' or 'single'. ISO support (which never worked) has been removed from mount_nfs. mount_nfs and umount now use mounttab, which allows umntall to work properly. The rc scripts now call umntall as appropriate. Submitted by: Martin Blapp <mb@imp.ch>
Diffstat (limited to 'etc')
-rw-r--r--etc/rc27
-rw-r--r--etc/rc.shutdown9
2 files changed, 33 insertions, 3 deletions
diff --git a/etc/rc b/etc/rc
index 7a73fb4..bd92247 100644
--- a/etc/rc
+++ b/etc/rc
@@ -113,10 +113,17 @@ esac
umount -a >/dev/null 2>&1
-# Where/how would this get set?
+# Early NFS mounts and clean up of /var/db/mounttab.
#
case ${early_nfs_mounts} in
[Yy][Ee][Ss])
+ case $1 in
+ autoboot)
+ if [ -f /var/db/mounttab ]; then
+ rpc.umntall -k
+ fi
+ ;;
+ esac
mount -a
;;
*)
@@ -199,10 +206,24 @@ if [ -r /etc/rc.network ]; then
network_pass1
fi
-# Retest for early_nfs here?
+# Only mount NFS file systems if $early_nfs_mounts is false.
+# If there is a /var/db/mounttab, clean it up with rpc.umntall.
#
echo -n "Mounting NFS file systems"
-mount -a -t nfs
+case ${early_nfs_mounts} in
+[Yy][Ee][Ss])
+ ;;
+*)
+ case $1 in
+ autoboot)
+ if [ -f /var/db/mounttab ]; then
+ rpc.umntall -k
+ fi
+ ;;
+ esac
+ mount -a -t nfs
+ ;;
+esac
echo .
# Whack the pty perms back into shape.
diff --git a/etc/rc.shutdown b/etc/rc.shutdown
index 0479e02..5492d89 100644
--- a/etc/rc.shutdown
+++ b/etc/rc.shutdown
@@ -17,6 +17,15 @@ HOME=/
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
export HOME PATH
+# Check if /var/db/mounttab is clean.
+case $1 in
+reboot)
+ if [ -f /var/db/mounttab ]; then
+ rpc.umntall
+ fi
+ ;;
+esac
+
echo -n "Shutting down daemon processes: "
# Insert shutdown procedures here
OpenPOWER on IntegriCloud