]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
save SOA values
authorMark Andrews <marka@isc.org>
Thu, 19 Jul 2018 22:11:49 +0000 (08:11 +1000)
committerMark Andrews <marka@isc.org>
Thu, 2 Aug 2018 01:29:15 +0000 (11:29 +1000)
(cherry picked from commit 6b30bc73c049b201e4736a789c47fb39b9c1e2c6)

bin/tests/system/nsupdate/tests.sh

index 2a01d1e46d498ec07ceb6398c574f45b2543a0b1..cf09bd9408b51244c805eae5f888d1a0ecb0b178 100755 (executable)
@@ -266,7 +266,8 @@ END
 n=`expr $n + 1`
 ret=0
 echo_i "check that unixtime serial number is correctly generated ($n)"
-oldserial=`$DIG $DIGOPTS +short unixtime.nil. soa @10.53.0.1 | awk '{print $3}'` || ret=1
+$DIG $DIGOPTS +short unixtime.nil. soa @10.53.0.1 > dig.out.old.test$n || ret=1
+oldserial=`awk '{print $3}' dig.out.old.test$n` || ret=1
 $NSUPDATE <<END > /dev/null 2>&1 || ret=1
     server 10.53.0.1 ${PORT}
     ttl 600
@@ -275,7 +276,8 @@ $NSUPDATE <<END > /dev/null 2>&1 || ret=1
 END
 now=`$PERL -e 'print time()."\n";'`
 sleep 1
-serial=`$DIG $DIGOPTS +short unixtime.nil. soa @10.53.0.1 | awk '{print $3}'` || ret=1
+$DIG $DIGOPTS +short unixtime.nil. soa @10.53.0.1 > dig.out.new.test$n || ret=1
+serial=`awk '{print $3}' dig.out.new.test$n` || ret=1
 [ "$oldserial" -ne "$serial" ] || ret=1
 # allow up to 2 seconds difference between the serial
 # number and the unix epoch date but no more