diff options
-rwxr-xr-x | netfs | 35 | ||||
-rw-r--r-- | rc.conf | 2 | ||||
-rwxr-xr-x | rc.multi | 3 |
3 files changed, 36 insertions, 4 deletions
@@ -0,0 +1,35 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Mounting Network Filesystems" + /bin/mount -a -t nfs,smbfs,codafs + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon netfs + stat_done + fi + ;; + stop) + stat_busy "Unmounting network filesystems" + [ ! -z "$PID" ] && kill $PID &> /dev/null + umount -a -t nfs,smbfs,codafs + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon netfs + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac @@ -51,6 +51,6 @@ ROUTES=(!gateway) # Daemons to start at boot-up (in this order) # (prefix a daemon with a ! to disable it) # -DAEMONS=(syslogd klogd !pcmcia network crond) +DAEMONS=(syslogd klogd !pcmcia network netfs crond) # End of file @@ -17,7 +17,4 @@ if [ -x /etc/rc.local ]; then /etc/rc.local fi -# Mount any leftover (nfs,smbfs,etc) mounts -/bin/mount -a - # End of file |