in reply to Re: DNS Failover
in thread DNS Failover

Thanks! This is helpful as well. Kind of under the gun on this one short term so going to have to do it the dirty way for now and come back and clean it up perhaps using templates later.

You mentioned using perl -pi -e to do this mass update yesterday and I tried from cmd line and it works great, however when I try to put it in my script it does nothing.

Here is what I am trying to do:

# USAGE $0 {failover|failback|status} $1 {serial}
$VARIABLE = $ARGV[0];
$Serial = $ARGV1;
`perl -pi -e 's/2007\d\d\d\d\d\d/$Serial/' $ROOT_DIR/*`;

So I pass in the serial as an arg to the script and then pass it down to the perl -pi command. What am I missing here? $ROOT_DIR is defined as well pointing to /var/named/zone.

Sure it is something obvious and silly but any help you can provide would be greatly appreciated.

Thank you -

Brad Jensen