]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:script: Fix shellcheck errors in test_smbstatus.sh
authorAndreas Schneider <asn@samba.org>
Wed, 8 Jun 2022 12:47:20 +0000 (14:47 +0200)
committerPavel Filipensky <pfilipensky@samba.org>
Mon, 22 Aug 2022 14:20:36 +0000 (14:20 +0000)
test_smbstatus.sh:78:22: error: Use braces when expanding arrays, e.g.
${array[idx]} (or ${var}[.. to quiet). [SC1087]

test_smbstatus.sh:135:22: error: Use braces when expanding arrays, e.g.
${array[idx]} (or ${var}[.. to quiet). [SC1087]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
source3/script/tests/test_smbstatus.sh

index b24fe735aa57978d2d9d64aba5218cc298529026..30ca2398fa12bb75a494ebe945853b3d7829d112 100755 (executable)
@@ -75,7 +75,7 @@ EOF
                return
        fi
 
-       echo "$out" | grep "$userid[ ]*DENY_NONE"
+       echo "$out" | grep "${userid}[ ]*DENY_NONE"
        ret=$?
        if [ $ret != 0 ]; then
                echo "Failed to find userid in smbstatus locked file output"
@@ -132,7 +132,7 @@ EOF
                return
        fi
 
-       echo "$out" | grep "$USERNAME[ ]*DENY_NONE"
+       echo "$out" | grep "${USERNAME}[ ]*DENY_NONE"
        ret=$?
        if [ $ret != 0 ]; then
                echo "Failed to find userid in smbstatus locked file output"