[*] First commit
This commit is contained in:
36
daemon/netfs
Executable file
36
daemon/netfs
Executable file
@ -0,0 +1,36 @@
|
||||
#!/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"
|
||||
mount -a -t "$NETFS"
|
||||
rc=$?
|
||||
mount -a -O _netdev
|
||||
(( rc || $? )) && stat_die
|
||||
add_daemon netfs
|
||||
stat_done
|
||||
;;
|
||||
stop)
|
||||
stat_busy "Unmounting network filesystems"
|
||||
umount -a -f -O _netdev
|
||||
rc=$?
|
||||
umount -a -f -t "$NETFS"
|
||||
(( rc || $? )) && stat_die
|
||||
rm_daemon netfs
|
||||
stat_done
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
# vim: set ts=2 noet:
|
Reference in New Issue
Block a user