From 3558d83c34933aea6d53fd3ad96c0828798474cd Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Mon, 31 Jul 2017 10:22:54 -0400 Subject: scripts: invalid test(1) in extras/S32gluster_enable_shared_storage.sh test(1) man pages says -eq is for INTEGER compares, and = is for string compares. Also note the comment that -a and -o are ambiguous and to use test && test or test || test instead. This bug has existed since 2015! (yikes) Found while testing localtime logging and running glusterd in the foreground. Change-Id: Ia544f7295e247b981504d085ebc4c533ab60ba84 BUG: 1476819 Signed-off-by: Kaleb S. KEITHLEY Reviewed-on: https://review.gluster.org/17926 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh index ad51babd5f7..c0aa73548fd 100755 --- a/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh +++ b/extras/hook-scripts/set/post/S32gluster_enable_shared_storage.sh @@ -2,7 +2,7 @@ key=`echo $3 | cut -d '=' -f 1` val=`echo $3 | cut -d '=' -f 2` -if [ ! "$key" -eq "enable-shared-storage" -o "$key" -eq "cluster.enable-shared-storage" ]; then +if [ "$key" != "cluster.enable-shared-storage" ] && [ "$key" != "enable-shared-storage" ]; then exit; fi if [ "$val" != 'enable' ]; then -- cgit