2000-04-26 H.J. Lu <hjl@lucon.org>
[nfs-utils.git] / etc / redhat / nfslock.init
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