From c51b2f7c6c72cdc2a6ea65b3d4b4f927814d909f Mon Sep 17 00:00:00 2001 From: Lakshmipathi Date: Tue, 7 Jun 2011 03:51:19 +0000 Subject: build : use pid file to kill nfs process Signed-off-by: Lakshmipathi.G Signed-off-by: Anand Avati BUG: 2969 (add --pidfile option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2969 --- extras/init.d/glusterd-Redhat.in | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in index 0c39ff139..6e1260e5c 100755 --- a/extras/init.d/glusterd-Redhat.in +++ b/extras/init.d/glusterd-Redhat.in @@ -34,8 +34,17 @@ stop() pidof -c -o %PPID -x $GLUSTERFSD &> /dev/null [ $? -eq 0 ] && killproc $GLUSTERFSD &> /dev/null - pidof -c -o %PPID -x $GLUSTERFS &> /dev/null - [ $? -eq 0 ] && killproc $GLUSTERFS &> /dev/null + #pidof -c -o %PPID -x $GLUSTERFS &> /dev/null + #[ $? -eq 0 ] && killproc $GLUSTERFS &> /dev/null + + if [ -f /etc/glusterd/nfs/run/nfs.pid ] ;then + pid=`cat /etc/glusterd/nfs/run/nfs.pid`; + cmd=`ps -p $pid -o comm=` + + if [ $cmd == "glusterfs" ]; then + kill `cat /etc/glusterd/nfs/run/nfs.pid` + fi + fi } -- cgit