X-Git-Url: https://git.sesse.net/?p=nms;a=blobdiff_plain;f=make-all-config.sh;h=1db0af253c8434f31f10bdbbff59a25cdfe3b4af;hp=4321b568ddb87cd252e3342eddbddcc91d14f118;hb=HEAD;hpb=c3722eb392964e4f5172d1a49de9cc14a4aa8dcd diff --git a/make-all-config.sh b/make-all-config.sh index 4321b56..1db0af2 100755 --- a/make-all-config.sh +++ b/make-all-config.sh @@ -11,4 +11,7 @@ cat static-switches.txt >> switches.txt 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 | perl -e 'while (<>) { chomp; my ($net,$mask) = split / /; print "\t\"$net/$mask\",\n"; }' ; echo ');' ; echo '1;') > mbd/nets.pl +(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: