]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix rndc test
authorEvan Hunt <each@isc.org>
Wed, 23 Jan 2019 08:52:21 +0000 (00:52 -0800)
committerEvan Hunt <each@isc.org>
Fri, 25 Jan 2019 19:24:10 +0000 (11:24 -0800)
use regex instead of exact string matching to deal with CR at end of line

bin/tests/system/rndc/tests.sh

index b9dda3827edd0ce1ffd8edd1a549efbdd9571f75..7cbe2c7338a86251eca0f6af345a23f6c3475bff 100644 (file)
@@ -227,7 +227,7 @@ do
        grep "addition 6" ns2/other.db > /dev/null && break
        sleep 1
 done
-serial=`awk '$3 == "serial" {print $1}' ns2/other.db`
+serial=`awk '$3 ~ /serial/ {print $1}' ns2/other.db`
 newserial=`expr $serial + 1`
 sed s/$serial/$newserial/ ns2/other.db > ns2/other.db.new
 echo 'frozen TXT "frozen addition"' >> ns2/other.db.new
@@ -270,7 +270,7 @@ do
        grep "addition 6" ns2/nil.db > /dev/null && break
        sleep 1
 done
-serial=`awk '$3 == "serial" {print $1}' ns2/nil.db`
+serial=`awk '$3 ~ /serial/ {print $1}' ns2/nil.db`
 newserial=`expr $serial + 1`
 sed s/$serial/$newserial/ ns2/nil.db > ns2/nil.db.new
 echo 'frozen TXT "frozen addition"' >> ns2/nil.db.new