From c0a14c00bfb9152abdb5cedcf5aa1b9ed9a6ac6a Mon Sep 17 00:00:00 2001 From: Varun Shastry Date: Fri, 29 Nov 2013 14:49:33 +0530 Subject: features/quota: Make grep search more accurately The hook script was searching the info file for "features.quota" to know the quota status (enable/disabled). When features.quota-deem-statfs the grep is not accurate. Fixed this issue. Change-Id: I4104a93c1c1e0ac9fd7ef7bfef993425ab50e651 BUG: 969461 Signed-off-by: Varun Shastry Reviewed-on: http://review.gluster.org/6380 Tested-by: Gluster Build System Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Vijay Bellur --- extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extras') diff --git a/extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh b/extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh index 2580a4c58..d5658e3c8 100755 --- a/extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh +++ b/extras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh @@ -80,7 +80,7 @@ then fi ## Is quota enabled? -FLAG=`cat $GLUSTERD_WORKING_DIR/vols/$VOL_NAME/info | grep "^features.quota" \ +FLAG=`cat $GLUSTERD_WORKING_DIR/vols/$VOL_NAME/info | grep "^features.quota=" \ | awk -F'=' '{print $NF}'`; if [ "$FLAG" != "on" ] then @@ -88,7 +88,7 @@ then fi ## Is volume started? -FLAG=`cat $GLUSTERD_WORKING_DIR/vols/$VOL_NAME/info | grep "^status" \ +FLAG=`cat $GLUSTERD_WORKING_DIR/vols/$VOL_NAME/info | grep "^status=" \ | awk -F'=' '{print $NF}'`; if [ "$FLAG" != "1" ] then -- cgit