2000-04-26 H.J. Lu <hjl@lucon.org>
authorhjl <hjl>
Wed, 26 Apr 2000 21:43:44 +0000 (21:43 +0000)
committerhjl <hjl>
Wed, 26 Apr 2000 21:43:44 +0000 (21:43 +0000)
* etc/redhat/nfslock.init: Check if lockd exits before killing
it.

ChangeLog
etc/redhat/nfslock.init

index a55e1b0..47673d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-26  H.J. Lu <hjl@lucon.org>
+
+       * etc/redhat/nfslock.init: Check if lockd exits before killing
+       it.
+
 2000-04-25  H.J. Lu <hjl@lucon.org>
 
        * README: Require util-linux-2.10f-mount-rpc.patch for mount.
index 9e9a2c9..469840c 100755 (executable)
@@ -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
+                       [ -d /proc/$apid ] && 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