]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
use portable awk
authorMark Andrews <marka@isc.org>
Wed, 14 May 2014 14:34:17 +0000 (00:34 +1000)
committerMark Andrews <marka@isc.org>
Wed, 14 May 2014 14:34:49 +0000 (00:34 +1000)
(cherry picked from commit 69530009f1d9ec51de6184704be960cf7d32e479)

bin/tests/system/ixfr/tests.sh

index 90baccbd8e9bb17e318749afbdb7c7212cd9399e..4ba85a90fbef523c369e420b5b6c41e0cdd1f6e9 100644 (file)
@@ -255,11 +255,11 @@ ret=0
 $DIG +notcp ixfr=1 test -p 5300 @10.53.0.4 > dig.out1 || ret=1
 $DIG ixfr=1 +notcp test -p 5300 @10.53.0.4 > dig.out2 || ret=1
 $PERL ../digcomp.pl dig.out1 dig.out2 || ret=1
-awk '$4 == "SOA" { soacnt++} END {exit(soacnt == 1 ? 0 : 1);}' dig.out1 || ret=1
-awk '$4 == "SOA" { exit($7 == 4 ? 0 : 1);}' dig.out1 || ret=1
+awk '$4 == "SOA" { soacnt++} END {if (soacnt == 1) exit(0); else exit(1);}' dig.out1 || ret=1
+awk '$4 == "SOA" { if ($7 == 4) exit(0); else exit(1);}' dig.out1 || ret=1
 # Should be incremental transfer.
 $DIG ixfr=1 test -p 5300 @10.53.0.4 > dig.out3 || ret=1
-awk '$4 == "SOA" { soacnt++} END {exit(soacnt == 6 ? 0 : 1);}' dig.out3 || ret=1
+awk '$4 == "SOA" { soacnt++} END { if (soacnt == 6) exit(0); else exit(1);}' dig.out3 || ret=1
 if [ ${ret} != 0 ]; then
        echo "I:failed";
        status=1;