From 85865daa1b7dd11badf9f5192e050e1998c76f8a Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 23 Mar 2015 15:07:47 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/9970 Tested-by: Gluster Build System Reviewed-by: Aravinda VK Reviewed-by: Vijay Bellur --- extras/stop-all-gluster-processes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extras') 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 "$@"; -- cgit