[Lunar-commits] nfs-utils: Readding init.d scripts that got deleted during crater merge

Stefan Wold ratler at lunar-linux.org
Tue Dec 4 08:09:37 CET 2007


commit fabd6d18afca6ca051074c8a07364a84492a1f2d
Author: Stefan Wold <ratler at lunar-linux.org>
Date:   Tue Dec 4 08:08:58 2007 +0100

    nfs-utils: Readding init.d scripts that got deleted during crater merge
---
 filesys/nfs-utils/init.d/nfs     |   45 ++++++++++++++++++++++++++++++++++++++
 filesys/nfs-utils/init.d/nfslock |   24 ++++++++++++++++++++
 2 files changed, 69 insertions(+), 0 deletions(-)

diff --git a/filesys/nfs-utils/init.d/nfs b/filesys/nfs-utils/init.d/nfs
new file mode 100755
index 0000000..11247be
--- /dev/null
+++ b/filesys/nfs-utils/init.d/nfs
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# nfs           This shell script takes care of starting and stopping
+#               the NFS services.
+#
+# chkconfig: 35 60 40
+# description: NFS is a popular protocol for file sharing across TCP/IP \
+#              networks. This service provides NFS server functionality, \
+#              which is configured via the /etc/exports file.
+# probe: true
+
+[  -e /etc/exports  ]  ||  exit 0
+
+NUMSERVERS=8
+MOUNTDOPTS=
+
+case $1 in
+   start|restart)  echo "$1ing NFS services"
+                   exportfs -r 
+
+                   pkill      "^rpc.rquotad$"  &&  sleep  5
+                   pkill      "^rpc.mountd$"   &&  sleep  5
+                   pkill  -1  "^nfsd$"         &&  sleep  5
+                   pkill      "^rpc.statd$"    &&  sleep  5
+
+                   ps  -C  portmap  >  /dev/null  ||
+                   /etc/init.d/portmap start
+                   /usr/sbin/rpc.rquotad
+                   /usr/sbin/rpc.mountd  $MOUNTDOPTS
+                   /usr/sbin/rpc.nfsd    $NUMSERVERS
+                   /usr/sbin/rpc.statd
+                   ;;
+
+            stop)  echo "$1ping NFS services"
+                   /usr/sbin/exportfs -au
+    
+                   pkill      "^rpc.rquotad$"
+                   pkill      "^rpc.mountd$"
+                   pkill  -1  "^nfsd$"
+                   pkill      "^rpc.statd$"
+                   ;;
+
+               *)  echo "Usage: $0 {start|stop|restart}"
+                   ;;
+esac
diff --git a/filesys/nfs-utils/init.d/nfslock b/filesys/nfs-utils/init.d/nfslock
new file mode 100755
index 0000000..3443a6a
--- /dev/null
+++ b/filesys/nfs-utils/init.d/nfslock
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# nfslock       This shell script takes care of starting and stopping
+#               the NFS file locking service.
+#
+# chkconfig: 345 14 86
+# description: NFS is a popular protocol for file sharing across \
+#              TCP/IP networks. This service provides NFS file \
+#              locking functionality.
+# probe: true
+
+case $1 in
+  start|restart)  echo   "$1ing NFS file locking services, rpc.statd"
+                  pkill  "^rpc.statd$"  &&  sleep  5
+                  ps  -C  portmap  >  /dev/null  ||
+                  /etc/init.d/portmap start
+                  /usr/sbin/rpc.statd
+                  ;;
+           stop)  echo "$1ping NFS file locking services"
+                  pkill  "^rpc.statd$"
+                  ;;
+              *)  echo "Usage $0 {start|stop|restart}"
+                  ;;
+esac


More information about the Lunar-commits mailing list