]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - etc/redhat/nfslock.init
2001-03-09 H.J. Lu <hjl@lucon.org>
[nfs-utils.git] / etc / redhat / nfslock.init
index 9e9a2c914d15bf9fcca53e1cef6bd1be9d8cfd1d..401c61445dd5238ba10bf01879ded1d7c0c5ab70 100755 (executable)
@@ -3,7 +3,7 @@
 # nfslock       This shell script takes care of starting and stopping
 #               the NFS file locking service.
 #
-# chkconfig: 345 60 20
+# chkconfig: 345 60 86
 # description: NFS is a popular protocol for file sharing across \
 #             TCP/IP networks. This service provides NFS file \
 #             locking functionality.
@@ -41,9 +41,18 @@ case "$1" in
   stop)
        # Stop daemons.
        echo "Shutting down NFS file locking services: "
-       echo -n "Shutting down NFS lockd: "
-       killproc lockd
-       echo
+       pidlist=`pidofproc lockd`
+       if [ -n "$pidlist" ]; then
+               pid=
+               for apid in $pidlist ; do
+                       [ -f /proc/$apid/exe ] && pid="$pid $apid"
+               done
+               if [ -n "$pid" ]; then
+                       echo -n "Shutting down NFS lockd: "
+                       killproc lockd
+                       echo
+               fi
+       fi
        echo -n "Shutting down NFS statd: "
        killproc rpc.statd
        echo