diff options
author | Kotresh HR <khiremat@redhat.com> | 2015-03-23 15:07:47 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-04-06 10:44:35 -0700 |
commit | 85865daa1b7dd11badf9f5192e050e1998c76f8a (patch) | |
tree | 0526d2d1e5910ee3d50c7ea74550b4735dc47b1c | |
parent | 97cfe210c73bcdab653a0da884627009f5c5808b (diff) |
extras: Fix stop-all-gluster-processes.sh script
"test -n" command takes single string as argument. The
command was failing with "Too many arguments" when multiple
pids are got.
Change-Id: Icc409082f492c72522168d5e203684f00f52cf1b
BUG: 1204641
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9970
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rwxr-xr-x | extras/stop-all-gluster-processes.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extras/stop-all-gluster-processes.sh b/extras/stop-all-gluster-processes.sh index 6c81a301c72..087afa4cf22 100755 --- a/extras/stop-all-gluster-processes.sh +++ b/extras/stop-all-gluster-processes.sh @@ -13,7 +13,7 @@ function main() # processes are not having a pid file, so get it through 'ps' and # handle these processes gsyncpid=`ps aux | grep gluster | grep gsync | awk '{print $2}'`; - test -n $gsyncpid && kill -TERM $gsyncpid; + test -n "$gsyncpid" && kill -TERM $gsyncpid; sleep 5; @@ -27,7 +27,7 @@ function main() # handle 'KILL' of geo-replication gsyncpid=`ps aux | grep gluster | grep gsync | awk '{print $2}'`; - test -n $gsyncpid && kill -KILL $gsyncpid; + test -n "$gsyncpid" && kill -KILL $gsyncpid; } main "$@"; |