summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmipathi <lakshmipathi@gluster.com>2011-06-07 03:51:19 +0000
committerAnand Avati <avati@gluster.com>2011-06-08 11:19:28 -0700
commitc51b2f7c6c72cdc2a6ea65b3d4b4f927814d909f (patch)
tree7de5eb6d3c7fd949adbf97b2799431000772bc57
parent60079f55d3fda6c16d391ababcfa44aa7d65923e (diff)
build : use pid file to kill nfs processv3.2.1qa3
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
-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
}