summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorLakshmipathi <lakshmipathi@gluster.com>2011-06-07 03:47:11 +0000
committerAnand Avati <avati@gluster.com>2011-06-08 11:17:29 -0700
commit29397bda249d8d3f93dd6ee5c449b3590dbaf15e (patch)
treeb3bfa65b29e878f6bb87c7d25e4c6147dc10edcb /extras
parent2b53a40350afa4dd9e0d77502700cdee0299766c (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.in13
1 files changed, 11 insertions, 2 deletions
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
}