X-Git-Url: https://git.sesse.net/?p=nms;a=blobdiff_plain;f=make-all-config.sh;h=1db0af253c8434f31f10bdbbff59a25cdfe3b4af;hp=c186b2874f7c3d6af0396c1be467388e95dc2978;hb=HEAD;hpb=a78ca3c9628b209500205ad77b333bd656175f34 diff --git a/make-all-config.sh b/make-all-config.sh index c186b28..1db0af2 100755 --- a/make-all-config.sh +++ b/make-all-config.sh @@ -1,5 +1,6 @@ #! /bin/sh ./planning/planning +scp switches.txt patchlist.txt space:/root/ cat static-switches.txt >> switches.txt ./config/make-dhcpd.pl > /etc/dhcp3/dhcpd.conf ./config/make-named.pl > /etc/bind/named.conf @@ -8,3 +9,9 @@ cat static-switches.txt >> switches.txt (cd mbd && ./generate-helper-list.pl > ../mbd-ports) ./config/make-port-config.pl scp mbd-ports *-config sesse@f1:/tftpboot/portcfg/ + +# regenerate the mbd netlist +(echo '# Autogenerated. Do not touch!' ; echo "package Config;"; echo 'our @networks = (' ; cut -d" " -f1-2 switches.txt | grep -vE '87\.76\.(130|131|216)\.0' | perl -e 'while (<>) { chomp; my ($net,$mask) = split / /; print "\t\"$net/$mask\",\n"; }' ; echo ');' ; echo '1;') > mbd/nets.pl + +perl web/make-switches.pl > switches.sql +scp switches.sql root@space: