35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
|
|
From 396f52a60bbe5eba0075b1658d84e46cbf7461ab Mon Sep 17 00:00:00 2001
|
||
|
|
From: zhanchengbin <zhanchengbin1@huawei.com>
|
||
|
|
Date: Thu, 13 Oct 2022 10:34:52 +0800
|
||
|
|
Subject: [PATCH] SC2081: [ .. ] can't match globs. Use [[ .. ]] or grep.
|
||
|
|
|
||
|
|
Shellcheck check out a problem.
|
||
|
|
|
||
|
|
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
|
||
|
|
---
|
||
|
|
.../add-brick/post/disabled-quota-root-xattr-heal.sh | 4 ++--
|
||
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh b/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh
|
||
|
|
index ca17a90..969d6fc 100755
|
||
|
|
--- a/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh
|
||
|
|
+++ b/extras/hook-scripts/add-brick/post/disabled-quota-root-xattr-heal.sh
|
||
|
|
@@ -1,4 +1,4 @@
|
||
|
|
-#!/bin/sh
|
||
|
|
+#!/bin/bash
|
||
|
|
|
||
|
|
##---------------------------------------------------------------------------
|
||
|
|
## This script updates the 'limit-set' xattr on the newly added node. Please
|
||
|
|
@@ -106,7 +106,7 @@ ENABLED_STATE_1="${GLUSTERD_WORKDIR}/hooks/${VERSION}/${VOLUME_OP}/"
|
||
|
|
ENABLED_STATE_2="post/${ENABLED_NAME_PREFIX}${VOL_NAME}-${ENABLED_NAME}"
|
||
|
|
ENABLED_STATE="${ENABLED_STATE_1}${ENABLED_STATE_2}"
|
||
|
|
|
||
|
|
-if [ "${THIS_SCRIPT}" != *"${VOL_NAME}"* ]; then
|
||
|
|
+if [[ "${THIS_SCRIPT}" != *"${VOL_NAME}"* ]]; then
|
||
|
|
exit 0
|
||
|
|
fi
|
||
|
|
|
||
|
|
--
|
||
|
|
2.37.3
|
||
|
|
|