]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Get rid of bashisms in string comparisons
authorMichal Nowak <mnowak@isc.org>
Tue, 27 Oct 2020 09:20:05 +0000 (10:20 +0100)
committerMichal Nowak <mnowak@isc.org>
Tue, 27 Oct 2020 11:21:07 +0000 (12:21 +0100)
The double equal sign ('==') is a Bash-specific string comparison
operator.  Ensure the single equal sign ('=') is used in all POSIX shell
scripts in the system test suite in order to retain their portability.

bin/tests/system/kasp/tests.sh
bin/tests/system/rpz/tests.sh

index 378df45fa3f597c5be48240aeb92c6b33176eb2f..e875e406c9dcdc4ee5884f47e6ac24057a47182c 100644 (file)
@@ -5661,10 +5661,10 @@ dnssec_verify
 n=$((n+1))
 echo_i "check that of zone ${ZONE} migration to dnssec-policy uses the same keys ($n)"
 ret=0
-[ $_migrate_ext8_ksk == $_migrate_int8_ksk ] || log_error "mismatch ksk tag"
-[ $_migrate_ext8_zsk == $_migrate_int8_zsk ] || log_error "mismatch zsk tag"
-[ $_migrate_ext8_ksk == $(key_get KEY1 ID) ] || log_error "mismatch ksk tag"
-[ $_migrate_ext8_zsk == $(key_get KEY2 ID) ] || log_error "mismatch zsk tag"
+[ $_migrate_ext8_ksk = $_migrate_int8_ksk ] || log_error "mismatch ksk tag"
+[ $_migrate_ext8_zsk = $_migrate_int8_zsk ] || log_error "mismatch zsk tag"
+[ $_migrate_ext8_ksk = $(key_get KEY1 ID) ] || log_error "mismatch ksk tag"
+[ $_migrate_ext8_zsk = $(key_get KEY2 ID) ] || log_error "mismatch zsk tag"
 status=$((status+ret))
 
 echo_i "exit status: $status"
index d73ccb939e6f0261d24f9f10218eee4d48325d1d..c728c45d5c8a798486a749103277314d28b1a773 100644 (file)
@@ -208,7 +208,7 @@ restart () {
        fi
     fi
     rm -f ns$1/*.jnl
-    if [ "$2" == "rebuild-bl-rpz" ]; then
+    if [ "$2" = "rebuild-bl-rpz" ]; then
         if test -f ns$1/base.db; then
            for NM in ns$1/bl*.db; do
                cp -f ns$1/base.db $NM