]> git.sesse.net Git - nms/blobdiff - make-all-config.sh
Merge.
[nms] / make-all-config.sh
index 5a8c893f8809469f915e8ccab04bbc5e3a5a950a..1db0af253c8434f31f10bdbbff59a25cdfe3b4af 100755 (executable)
@@ -1,9 +1,17 @@
 #! /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
 ./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)
-scp mbd-ports sesse@f1:/tftpboot/portcfg/
+./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: