aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2002-11-26 23:26:48 +0000
committerJudd Vinet <judd@archlinux.org>2002-11-26 23:26:48 +0000
commit43cda626dbc05e92dffc0027ef19db9d3cc44d37 (patch)
treef52b111d3f1e9ad5c3cb4635e92859c1c532142f
parentc8cd508809408a0be9f1fbeb65775ab7fb083f3b (diff)
downloadinitscripts-43cda626dbc05e92dffc0027ef19db9d3cc44d37.tar.xz
added nfsmount (from jk)
-rwxr-xr-xnfsmount36
1 files changed, 36 insertions, 0 deletions
diff --git a/nfsmount b/nfsmount
new file mode 100755
index 0000000..5e8e262
--- /dev/null
+++ b/nfsmount
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Mounting NFS filesystems"
+ if [ ! -f /var/run/daemons/portmap ]; then
+ stat_fail
+ exit 1
+ fi
+ mount -a -t nfs
+ add_daemon nfsmount
+ stat_done
+ ;;
+ stop)
+ stat_busy "Unmounting NFS filesystems"
+ umount -a -t nfs
+ sleep 1
+ if [ ! -z `mount -t nfs` ]; then
+ stat_fail
+ exit 1
+ fi
+ rm_daemon nfsmount
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0