Initial commit: Uploaded everything from abs/core
[arch-rock.git] / support / nfs-utils / nfsmount
blob712b705a5cc0014c0914ea3c4dd76aacd1a25783
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Mounting NFS filesystems"
9 if [ ! -f /var/run/daemons/portmap ]; then
10 stat_fail
11 echo "ERROR: portmap is not running"
12 exit 1
14 mount -a -t nfs
15 add_daemon nfsmount
16 stat_done
18 stop)
19 stat_busy "Unmounting NFS filesystems"
20 umount -a -t nfs
21 sleep 1
22 if [ ! -z `mount -t nfs` ]; then
23 stat_fail
24 exit 1
26 rm_daemon nfsmount
27 stat_done
29 restart)
30 $0 stop
31 sleep 2
32 $0 start
35 echo "usage: $0 {start|stop|restart}"
36 esac
37 exit 0