#!/bin/sh ################################################################# # # # Written 6/18/08 by Jeff Schroeder # # ################################################################# # # # # # verify-changes.sh - Verify newly added hosts or zones show up # # # on all dns servers. This has found and # # # helped me fix many misconfigurations # # # # # ################################################################# # $Id: verify-changes.sh 68130 2008-11-10 23:51:36Z jschroeder $ if [ "$#" -lt 1 ]; then echo "Usage: $(basename $1) dns.entry.or.zone.to.test.mtt" >&2 exit 1 fi testhost="$1" # Yes this is a gross hack. It gets the list of clusters the changes were # pushed out dynamically and uses them to test against. eval $(sed -n '/^CLUSTERS=/,/"$/p' pushnamedconf.sh 2>/dev/null) if [ -z "$CLUSTERS" ]; then echo "Problem reading cluster information from pushnamedconf.sh" >&2 exit 1 fi for cluster in $CLUSTERS; do tput bold echo -n $cluster | tr 'a-z' 'A-Z'; echo : tput sgr0 echo -n "ns1: "; host "$testhost" ns1.${cluster}.mtt | grep "$testhost" echo -n "ns2: "; host "$testhost" ns2.${cluster}.mtt | grep "$testhost" done