Use named-checkconf to get the list of master and slave zones from
named.conf then transfer them all and extract the CNAME ownername
that matches.
named-checkconf -p |
awk '$1 == "zone" { zone = $2; next; }
$1 == "type" && ( $2 == "slave;" || $2 == "master;" ) { print zone }' |
sed -e 's/^"//' -e 's/"$//' |
dig axfr -f - |
awk -v VSERVER=${VSERVER} '$4 == "CNAME" && $5 == VSERVER { print $1 }'
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: [email protected]
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
from this list
bind-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/bind-users