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>
This commit is contained in:
Kotresh HR 2015-03-23 15:07:47 +05:30 committed by Vijay Bellur
parent 97cfe210c7
commit 85865daa1b

View File

@ -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 "$@";