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>
This commit is contained in:
parent
a20e79ab3d
commit
c0a14c00bf
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user