]> git.sesse.net Git - nms/commitdiff
Update make-dhcpd.pl for TG06 (no split support yet).
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 9 Apr 2006 18:53:52 +0000 (18:53 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 9 Apr 2006 18:53:52 +0000 (18:53 +0000)
config/make-dhcpd.pl

index 9ca1edf685a11b0626b248653677798b8f877e06..2cac76e19d930221d05f6851c2471b0a00d968ea 100755 (executable)
@@ -9,7 +9,7 @@ open NAMES, "switches.txt"
        or die "switches.txt: $!";
 while (<NAMES>) {
        chomp;
-       /81\.162\.(\d+\.\d+)\s+(\d+)\s+(\S+)/ or next;
+       /194\.0\.(\d+\.\d+)\s+(\d+)\s+(\S+)/ or next;
        $netmasks{$1} = $2;
        $netnames{$1} = $3;
        push @nets, $1;
@@ -18,9 +18,10 @@ while (<NAMES>) {
 print <<"EOF";
 # Autogenerated by make-dhcpd.pl. Do not edit manually!
 
-option domain-name "tg05.gathering.org";
-option domain-name-servers 81.162.254.2, 81.162.254.76;
+option domain-name "tg06.gathering.org";
+option domain-name-servers 194.0.254.2;
 
+# ddns-update-style none;
 ddns-update-style interim;
 
 key DHCP_UPDATER {
@@ -31,13 +32,15 @@ key DHCP_UPDATER {
 default-lease-time 14400;
 max-lease-time 28800;
 
-# Servernett
-subnet 81.162.254.0 netmask 255.255.255.192 {
+# Tele-nett
+subnet 194.0.254.0 netmask 255.255.255.0 {
 }
-subnet 81.162.254.64 netmask 255.255.255.192 {
+
+# Server-nett
+subnet 194.0.255.0 netmask 255.255.255.0 {
 }
 
-zone 162.81.in-addr.arpa. {
+zone 0.194.in-addr.arpa. {
        primary 127.0.0.1;
        key DHCP_UPDATER;
 }
@@ -64,34 +67,34 @@ for my $net (@nets) {
        $net =~ /(\d+)\.(\d+)/ or die "Unknown net $net";
        my ($majorsubnet,$minorsubnet) = ($1,$2);
        
-       my $gw = "81.162.$majorsubnet." . ($minorsubnet + 1);
-       my $rangestart = "81.162.$majorsubnet." . ($minorsubnet + 10);
-       my $rangeend = "81.162.$majorsubnet." . ($minorsubnet + $numpc - 2);
+       my $gw = "194.0.$majorsubnet." . ($minorsubnet + 1);
+       my $rangestart = "194.0.$majorsubnet." . ($minorsubnet + 10);
+       my $rangeend = "194.0.$majorsubnet." . ($minorsubnet + $numpc - 2);
 
        print <<"EOF";
-zone $domain.tg05.gathering.org. {
+zone $domain.tg06.gathering.org. {
        primary 127.0.0.1;
        key DHCP_UPDATER;
 }
-subnet 81.162.$net netmask $netmask {
+subnet 194.0.$net netmask $netmask {
        authoritative;
        range $rangestart $rangeend;
        option routers $gw;
 
-       option domain-name "$domain.tg05.gathering.org";
-       ddns-domainname "$domain.tg05.gathering.org";
+       option domain-name "$domain.tg06.gathering.org";
+       ddns-domainname "$domain.tg06.gathering.org";
        ignore client-updates;
 EOF
 
        # hack for sesse =)
-       if ($net eq '250.0') {
-               print <<"EOF";
-       host trofast {
-               hardware ethernet 00:0e:0c:36:a7:66;
-               filename "/pxelinux.0";
-               next-server 81.162.254.89;
-       }
-EOF
+#      if ($net eq '250.0') {
+#              print <<"EOF";
+#      host trofast {
+#              hardware ethernet 00:0e:0c:36:a7:66;
+#              filename "/pxelinux.0";
+#              next-server 194.0.254.89;
+#      }
+#EOF
        }
        
        print "}\n";