]> git.sesse.net Git - nms/blob - make-all-config.sh
Merge.
[nms] / make-all-config.sh
1 #! /bin/sh
2 ./planning/planning
3 scp switches.txt patchlist.txt space:/root/
4 cat static-switches.txt >> switches.txt
5 ./config/make-dhcpd.pl > /etc/dhcp3/dhcpd.conf
6 ./config/make-named.pl > /etc/bind/named.conf
7 ./config/make-named-secondary.pl | ssh root@insert 'cat > /etc/bind/named.conf'
8 ./config/make-missing-zones.pl
9 (cd mbd && ./generate-helper-list.pl > ../mbd-ports)
10 ./config/make-port-config.pl
11 scp mbd-ports *-config sesse@f1:/tftpboot/portcfg/
12
13 # regenerate the mbd netlist
14 (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 
15
16 perl web/make-switches.pl > switches.sql
17 scp switches.sql root@space: