summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorLakshmipathi <lakshmipathi@gluster.com>2011-06-17 06:12:47 +0000
committerAnand Avati <avati@gluster.com>2011-06-17 08:34:16 -0700
commit70d0d908766dd4cd7802c97ce3e817ee200e7483 (patch)
treeb979a7852f4917f03abe7a2a4a252c4e573628c0 /extras
parentae6dc09a42a9392896015c7666e448a4a995843d (diff)
build : use pid file to kill nfs process
Signed-off-by: Lakshmipathi.G <lakshmipathi@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2969 (add --pidfile option) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2969
Diffstat (limited to 'extras')
-rwxr-xr-xextras/init.d/glusterd-Redhat.in11
1 files changed, 9 insertions, 2 deletions
diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in
index 0c39ff139..229d531bb 100755
--- a/extras/init.d/glusterd-Redhat.in
+++ b/extras/init.d/glusterd-Redhat.in
@@ -34,8 +34,15 @@ 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
+
+ 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 $pid
+ fi
+ fi
}