mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Replace incorrect sed expersion with awk
The sed expression could find the wrong instance of 10. Use awk to replace the TTL field and also to specify the server and issue the send command.
This commit is contained in:
@@ -63,4 +63,5 @@ rm -f perl.update_test.out
|
|||||||
rm -f nsupdate.out*
|
rm -f nsupdate.out*
|
||||||
rm -f typelist.out.*
|
rm -f typelist.out.*
|
||||||
rm -f update.out.*
|
rm -f update.out.*
|
||||||
|
rm -f update.in.*
|
||||||
rm -f verylarge
|
rm -f verylarge
|
||||||
|
@@ -750,9 +750,10 @@ ret=0
|
|||||||
echo_i "check that changes to the DNSKEY RRset TTL do not have side effects ($n)"
|
echo_i "check that changes to the DNSKEY RRset TTL do not have side effects ($n)"
|
||||||
$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
|
$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
|
||||||
@10.53.0.3 dnskey | \
|
@10.53.0.3 dnskey | \
|
||||||
sed -n 's/\(.*\)10.IN/update add \1600 IN/p' |
|
awk -v port="${PORT}" 'BEGIN { print "server 10.53.0.3", port; }
|
||||||
(echo server 10.53.0.3 ${PORT}; cat - ; echo send ) |
|
$2 == 10 && $3 == "IN" && $4 == "DNSKEY" { $2 = 600; print "update add", $0 }
|
||||||
$NSUPDATE
|
END { print "send" }' > update.in.$n
|
||||||
|
$NSUPDATE update.in.$n
|
||||||
|
|
||||||
$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
|
$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
|
||||||
@10.53.0.3 any > dig.out.ns3.$n
|
@10.53.0.3 any > dig.out.ns3.$n
|
||||||
|
Reference in New Issue
Block a user