X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=etc%2Fredhat%2Fnfslock.init;h=401c61445dd5238ba10bf01879ded1d7c0c5ab70;hb=28b85a4d9251cb711638da60c94acd6d61f0ae4f;hp=1442637816a34ece25f596b3f9e51b943168ec99;hpb=8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9;p=nfs-utils.git diff --git a/etc/redhat/nfslock.init b/etc/redhat/nfslock.init index 1442637..401c614 100755 --- a/etc/redhat/nfslock.init +++ b/etc/redhat/nfslock.init @@ -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. @@ -22,8 +22,8 @@ fi # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 -[ -x /usr/sbin/rpc.lockd ] || exit 0 -[ -x /usr/sbin/rpc.statd ] || exit 0 +[ -x /sbin/rpc.lockd ] || exit 0 +[ -x /sbin/rpc.statd ] || exit 0 # See how we were called. case "$1" in @@ -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