From 3452fba76bfe3a05039ee0b28b6c7d569fbf8984 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 3 Apr 2007 12:21:21 +0200 Subject: [PATCH] Fix a few bugs in the port config stuff --- config/make-port-config.pl | 15 ++++++++------- make-all-config.sh | 1 + 2 files changed, 9 insertions(+), 7 deletions(-) mode change 100644 => 100755 config/make-port-config.pl diff --git a/config/make-port-config.pl b/config/make-port-config.pl old mode 100644 new mode 100755 index 769c580..83fa997 --- a/config/make-port-config.pl +++ b/config/make-port-config.pl @@ -12,17 +12,17 @@ while () { my $ip; if ($switch == 1) { - $ip = "87.76." . ($row - 1) . "1"; + $ip = "87.76." . ($row) . ".1"; } elsif ($switch == 2) { - $ip = "87.76." . ($row - 1) . "65"; + $ip = "87.76." . ($row) . ".65"; } elsif ($switch == 3) { - $ip = "87.76." . ($row - 1) . "129"; + $ip = "87.76." . ($row) . ".129"; } elsif ($switch == 4) { - $ip = "87.76." . $row . "1"; + $ip = "87.76." . ($row + 1) . ".1"; } elsif ($switch == 5) { - $ip = "87.76." . $row . "65"; + $ip = "87.76." . ($row + 1) . ".65"; } elsif ($switch == 6) { - $ip = "87.76." . $row . "129"; + $ip = "87.76." . ($row + 1) . ".129"; } my $vlan = "$row$switch"; @@ -53,7 +53,7 @@ interface $port ip igmp snooping storm-control broadcast level 2 no shutdown - +! EOF } @@ -61,5 +61,6 @@ for my $distro (keys %distros) { open DISTRO, ">$distro-config" or die "$distro-config: $!"; print DISTRO $distros{$distro}; + print DISTRO "end\n"; close DISTRO; } diff --git a/make-all-config.sh b/make-all-config.sh index b97e043..c186b28 100755 --- a/make-all-config.sh +++ b/make-all-config.sh @@ -6,4 +6,5 @@ cat static-switches.txt >> switches.txt ./config/make-named-secondary.pl | ssh root@insert 'cat > /etc/bind/named.conf' ./config/make-missing-zones.pl (cd mbd && ./generate-helper-list.pl > ../mbd-ports) +./config/make-port-config.pl scp mbd-ports *-config sesse@f1:/tftpboot/portcfg/ -- 2.39.2