summaryrefslogtreecommitdiff
path: root/netfs
diff options
context:
space:
mode:
Diffstat (limited to 'netfs')
-rwxr-xr-xnetfs31
1 files changed, 12 insertions, 19 deletions
diff --git a/netfs b/netfs
index 2bcec6c..ea7e4eb 100755
--- a/netfs
+++ b/netfs
@@ -4,32 +4,24 @@
. /etc/rc.conf
. /etc/rc.d/functions
-rc=0
-
case "$1" in
start)
stat_busy "Mounting Network Filesystems"
- /bin/mount -a -t nfs,nfs4,smbfs,codafs,ncpfs,cifs,shfs,glusterfs,fuse,fuseblk,fuse.glusterfs,davfs
+ mount -a -t "$NETFS"
rc=$?
- /bin/mount -a -O _netdev
- if ((rc + $? > 0)); then
- stat_fail
- else
- add_daemon netfs
- stat_done
- fi
+ mount -a -O _netdev
+ (( rc || $? )) && stat_die
+ add_daemon netfs
+ stat_done
;;
stop)
stat_busy "Unmounting Network Filesystems"
- /bin/umount -a -O _netdev
+ umount -a -O _netdev
rc=$?
- /bin/umount -a -t nfs,nfs4,smbfs,codafs,ncpfs,cifs,shfs,glusterfs,fuse,fuseblk,fuse.glusterfs,davfs
- if ((rc + $? > 0)); then
- stat_fail
- else
- rm_daemon netfs
- stat_done
- fi
+ umount -a -t "$NETFS"
+ (( rc || $? )) && stat_die
+ rm_daemon netfs
+ stat_done
;;
restart)
$0 stop
@@ -37,7 +29,8 @@ case "$1" in
$0 start
;;
*)
- echo "usage: $0 {start|stop|restart}"
+ echo "usage: $0 {start|stop|restart}"
+ exit 1
esac
# vim: set ts=2 noet: