[master] check include file mtimes
3618. [func] "rndc reload" now checks modification times of include files as well as master files to determine whether to skip reloading a zone. [RT #33936]
This commit is contained in:
@@ -242,7 +242,7 @@ status=`expr $status + $ret`
|
||||
echo "I:test 'rndc dumpdb' on a empty cache"
|
||||
ret=0
|
||||
$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf dumpdb > /dev/null || ret=1
|
||||
for i in 1 2 3 4 5 6 7 8 9
|
||||
for i in 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
tmp=0
|
||||
grep "Dump complete" ns3/named_dump.db > /dev/null || tmp=1
|
||||
@@ -253,6 +253,34 @@ done
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:test 'rndc reload' on a zone with include files"
|
||||
ret=0
|
||||
grep "incl/IN: skipping load" ns2/named.run > /dev/null && ret=1
|
||||
loads=`grep "incl/IN: starting load" ns2/named.run | wc -l`
|
||||
[ "$loads" -eq 1 ] || ret=1
|
||||
$RNDC -s 10.53.0.2 -p 9953 -c ../common/rndc.conf reload > /dev/null || ret=1
|
||||
for i in 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
tmp=0
|
||||
grep "incl/IN: skipping load" ns2/named.run > /dev/null || tmp=1
|
||||
[ $tmp -eq 0 ] && break
|
||||
sleep 1
|
||||
done
|
||||
[ $tmp -eq 1 ] && ret=1
|
||||
touch ns2/static.db
|
||||
$RNDC -s 10.53.0.2 -p 9953 -c ../common/rndc.conf reload > /dev/null || ret=1
|
||||
for i in 1 2 3 4 5 6 7 8 9
|
||||
do
|
||||
tmp=0
|
||||
loads=`grep "incl/IN: starting load" ns2/named.run | wc -l`
|
||||
[ "$loads" -eq 2 ] || tmp=1
|
||||
[ $tmp -eq 0 ] && break
|
||||
sleep 1
|
||||
done
|
||||
[ $tmp -eq 1 ] && ret=1
|
||||
if [ $ret != 0 ]; then echo "I:failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo "I:testing rndc with hmac-md5"
|
||||
ret=0
|
||||
$RNDC -s 10.53.0.4 -p 9951 -c ns4/key1.conf status > /dev/null 2>&1 || ret=1
|
||||
|
||||
Reference in New Issue
Block a user