2009-10-08 03:40:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# sourcing our current rc.conf requires this to be a bash script
|
|
|
|
. /etc/rc.conf
|
|
|
|
. /etc/rc.d/functions
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
stat_busy "Mounting Network Filesystems"
|
2011-08-08 04:11:13 +00:00
|
|
|
mount -a -t "$NETFS"
|
2009-10-08 03:40:19 +00:00
|
|
|
rc=$?
|
2011-08-08 04:11:13 +00:00
|
|
|
mount -a -O _netdev
|
|
|
|
(( rc || $? )) && stat_die
|
|
|
|
add_daemon netfs
|
|
|
|
stat_done
|
2009-10-08 03:40:19 +00:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stat_busy "Unmounting Network Filesystems"
|
2011-08-08 04:11:13 +00:00
|
|
|
umount -a -O _netdev
|
2009-10-08 03:40:19 +00:00
|
|
|
rc=$?
|
2011-08-08 04:11:13 +00:00
|
|
|
umount -a -t "$NETFS"
|
|
|
|
(( rc || $? )) && stat_die
|
|
|
|
rm_daemon netfs
|
|
|
|
stat_done
|
2009-10-08 03:40:19 +00:00
|
|
|
;;
|
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
sleep 1
|
|
|
|
$0 start
|
|
|
|
;;
|
|
|
|
*)
|
2011-08-08 04:11:13 +00:00
|
|
|
echo "usage: $0 {start|stop|restart}"
|
|
|
|
exit 1
|
2009-10-08 03:40:19 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
# vim: set ts=2 noet:
|