summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVarun Shastry <vshastry@redhat.com>2013-11-29 14:49:33 +0530
committerVijay Bellur <vbellur@redhat.com>2014-01-28 22:41:39 -0800
commitd952c93588a2533a72efdff4f6853c5fa2dec766 (patch)
tree4e5c3dbc3c5cd1e04a5d0727f99c134948bba07b
parent6cb2106c22e1ea3758ac63dc725b888470f5dd5a (diff)
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 <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/6380 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/6839
-rwxr-xr-xextras/hook-scripts/add-brick/pre/S28Quota-enable-root-xattr-heal.sh4
1 files changed, 2 insertions, 2 deletions
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