From 06895ae11dbe8dc43dae53e128c122b149decf5f Mon Sep 17 00:00:00 2001 From: root Date: Sat, 31 Mar 2007 22:30:10 +0200 Subject: [PATCH] Update the DNS stuff for TG07. --- config/make-missing-zones.pl | 45 +++++++++++++++++------------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/config/make-missing-zones.pl b/config/make-missing-zones.pl index b809398..0ac4931 100755 --- a/config/make-missing-zones.pl +++ b/config/make-missing-zones.pl @@ -1,46 +1,43 @@ #! /usr/bin/perl -w use strict; -# les inn nettnavn -my %netnames = (); +my $date = `date --rfc-2822`; +chomp $date; + +my @nets = (); open NAMES, "switches.txt" or die "switches.txt: $!"; while () { chomp; - /194\.0\.(\d+\.\d+)\s+(\S+)\s+(\S+)/ or next; - $netnames{$1} = $3; -} -close NAMES; + /87\.76\.(\d+\.\d+)\s+(\d+)\s+(\S+)/ or next; + push @nets, { + net => $1, + netmask => $2, + name => $3 + }; +} -for my $net (keys %netnames) { - my $domain = $netnames{$net}; - my @domains; - if ($domain =~ /^split:(.*)/) { - @domains = split /,/, $1; - } else { - @domains = ($domain); - } +for my $net (@nets) { + my $d = $net->{name}; - for my $d (@domains) { - -f "/etc/bind/dynamic/$d.tg06.gathering.org" and next; + -f "/etc/bind/dynamic/$d.tg07.gathering.org" and next; - print "/etc/bind/dynamic/$d.tg06.gathering.org\n"; - open ZONE, ">/etc/bind/dynamic/$d.tg06.gathering.org" - or die "/etc/bind/dynamic/$d.tg06.gathering.org"; + print "/etc/bind/dynamic/$d.tg07.gathering.org\n"; + open ZONE, ">/etc/bind/dynamic/$d.tg07.gathering.org" + or die "/etc/bind/dynamic/$d.tg07.gathering.org"; - print ZONE <<"EOF"; + print ZONE <<"EOF"; ; autogenerated and updated from dhcpd -- DO NOT TOUCH! \$TTL 3600 -@ IN SOA fortran.tg06.gathering.org. postmaster.fortran.tg06.gathering.org. ( +@ IN SOA sysrq.tg07.gathering.org. abuse.gathering.org. ( 3 ; serial 3600 ; refresh 1800 ; retry 608400 ; expire 3600 ) ; minimum and default TTL - IN NS fortran.tg06.gathering.org. - IN NS lisp.tg06.gathering.org. + IN NS sysrq.tg07.gathering.org. + IN NS insert.tg07.gathering.org. EOF - } } -- 2.39.2