From 29397bda249d8d3f93dd6ee5c449b3590dbaf15e Mon Sep 17 00:00:00 2001 From: Lakshmipathi Date: Tue, 7 Jun 2011 03:47:11 +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(-) (limited to 'extras') diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in index 0c39ff139ac..6e1260e5cda 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