From 5b56f2e3cc0ec0feb71b7291bdae7803f313b5b3 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 1 May 2014 11:41:32 +1000 Subject: [PATCH] zero pad date and month fields --- bin/tests/system/dnssec/tests.sh | 2 +- bin/tests/system/nsupdate/tests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index dc76cffcef..9e81c51945 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -1542,7 +1542,7 @@ ret=0 cd signer $SIGNER -O full -f signer.out.9 -S -N date -o example example2.db > /dev/null 2>&1 ) || ret=1 -now=`$PERL -e '@lt=localtime(); printf "%.4d%.2d%2d00\n",$lt[5]+1900,$lt[4]+1,$lt[3];'` +now=`$PERL -e '@lt=localtime(); printf "%.4d%0.2d%0.2d00\n",$lt[5]+1900,$lt[4]+1,$lt[3];'` serial=`awk '/^;/ { next; } $4 == "SOA" { print $7 }' signer/signer.out.9` [ "$now" -eq "$serial" ] || ret=1 if [ $ret != 0 ]; then echo "I:failed"; fi diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index 25d8659b7d..7dad50fef3 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -590,7 +590,7 @@ $NSUPDATE < /dev/null 2>&1 || ret=1 update add new.yyyymmddvv.nil in a 1.2.3.4 send END -now=`$PERL -e '@lt=localtime(); printf "%.4d%.2d%2d00\n",$lt[5]+1900,$lt[4]+1,$lt[3];'` +now=`$PERL -e '@lt=localtime(); printf "%.4d%0.2d%0.2d00\n",$lt[5]+1900,$lt[4]+1,$lt[3];'` sleep 1 serial=`$DIG +short yyyymmddvv.nil. soa @10.53.0.1 -p 5300 | awk '{print $3}'` || ret=1 [ "$oldserial" -ne "$serial" ] || ret=1