From: Michał Kępień Date: Thu, 28 Jun 2018 11:38:39 +0000 (+0200) Subject: Make "rndc zonestatus" output for mirror zones different than for regular slave zones X-Git-Tag: v9.13.2~7^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=73d64de779f262cc63f1029470457002abf23403;p=thirdparty%2Fbind9.git Make "rndc zonestatus" output for mirror zones different than for regular slave zones Replace "type: slave" with "type: mirror" in "rndc zonestatus" output for mirror zones in order to enable the user to tell a regular slave zone and a mirror zone apart. --- diff --git a/bin/named/server.c b/bin/named/server.c index 20151d3563d..22b483123e5 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -13849,7 +13849,7 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex, type = "master"; break; case dns_zone_slave: - type = "slave"; + type = dns_zone_ismirror(zone) ? "mirror" : "slave"; break; case dns_zone_stub: type = "stub"; diff --git a/bin/tests/system/mirror/clean.sh b/bin/tests/system/mirror/clean.sh index 1c98ed6d3cf..3f459169587 100644 --- a/bin/tests/system/mirror/clean.sh +++ b/bin/tests/system/mirror/clean.sh @@ -20,3 +20,4 @@ rm -f */jn-* rm -f */named.memstats rm -f */named.run rm -f dig.out.* +rm -f rndc.out.* diff --git a/bin/tests/system/mirror/tests.sh b/bin/tests/system/mirror/tests.sh index 797610f0d2f..c82da3e095a 100644 --- a/bin/tests/system/mirror/tests.sh +++ b/bin/tests/system/mirror/tests.sh @@ -354,5 +354,13 @@ grep "initially-unavailable.*sending notifies" ns3/named.run > /dev/null && ret= if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` +n=`expr $n + 1` +echo_i "checking output of \"rndc zonestatus\" for a mirror zone ($n)" +ret=0 +$RNDCCMD 10.53.0.3 zonestatus . > rndc.out.ns3.test$n 2>&1 +grep "type: mirror" rndc.out.ns3.test$n > /dev/null || ret=1 +if [ $ret != 0 ]; then echo_i "failed"; fi +status=`expr $status + $ret` + echo_i "exit status: $status" [ $status -eq 0 ] || exit 1