summaryrefslogtreecommitdiff
path: root/gen-interface-templates.pl
diff options
context:
space:
mode:
authorCarl Byington <carl@five-ten-sg.com>2014-12-03 12:35:42 -0800
committerDaniil Baturin <daniil@baturin.org>2015-05-03 23:39:57 +0200
commitef64625ee5e9b911f3bfb3a9670df631ff6076fd (patch)
tree691115db2bf1ff20c052463d93c2b23a0c0f6993 /gen-interface-templates.pl
parentecc741a5f6731b572072b0b34ab20ddf7b3aab76 (diff)
downloadvyatta-cfg-firewall-ef64625ee5e9b911f3bfb3a9670df631ff6076fd.tar.gz
vyatta-cfg-firewall-ef64625ee5e9b911f3bfb3a9670df631ff6076fd.zip
add interfaces/vti/<intf>/policy add interfaces/ethernet/<intf>/vrrp/vrrp-group/policy remove interfaces/ethernet/<intf>/pppoa
cleanup and sort lists of interfaces Signed-off-by: Daniil Baturin <daniil@baturin.org>
Diffstat (limited to 'gen-interface-templates.pl')
-rwxr-xr-xgen-interface-templates.pl70
1 files changed, 32 insertions, 38 deletions
diff --git a/gen-interface-templates.pl b/gen-interface-templates.pl
index 9f3bc9c..b7b4585 100755
--- a/gen-interface-templates.pl
+++ b/gen-interface-templates.pl
@@ -36,70 +36,64 @@ my $debug = 0;
# the partial pathname under the config template tree "interfaces/".
#
my %interface_hash = (
- 'bonding/node.tag' => '$VAR(../../../@)',
- 'bonding/node.tag/vif/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
- 'bonding/node.tag/vif-s/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
- 'bonding/node.tag/vif-s/node.tag/vif-c/node.tag' => '$VAR(../../../../@).$VAR(../../../@).$VAR(../../@)',
-
- 'ethernet/node.tag' => '$VAR(../../../@)',
- 'ethernet/node.tag/pppoe/node.tag' => 'pppoe$VAR(../../../@)',
- 'ethernet/node.tag/vif/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
- 'ethernet/node.tag/vif/node.tag/pppoe/node.tag' => 'pppoe$VAR(../../../@)',
- 'ethernet/node.tag/vif-s/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
- 'ethernet/node.tag/vif-s/node.tag/vif-c/node.tag' => '$VAR(../../../../@).$VAR(../../../@).$VAR(../../@)',
- 'ethernet/node.tag/vrrp/vrrp-group/node.tag' => '$VAR(../../../../../@)v$VAR(../../../@)',
-
+ 'bonding/node.tag' => '$VAR(../../../@)',
+ 'bonding/node.tag/vif-s/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
+ 'bonding/node.tag/vif-s/node.tag/vif-c/node.tag' => '$VAR(../../../../@).$VAR(../../../@).$VAR(../../@)',
+ 'bonding/node.tag/vif/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
+ 'bridge/node.tag' => '$VAR(../../../@)',
+ 'dummy/node.tag' => '$VAR(../../../@)'
+ 'ethernet/node.tag' => '$VAR(../../../@)',
+ 'ethernet/node.tag/pppoe/node.tag' => 'pppoe$VAR(../../../@)',
+ 'ethernet/node.tag/vif-s/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
+ 'ethernet/node.tag/vif-s/node.tag/vif-c/node.tag' => '$VAR(../../../../@).$VAR(../../../@).$VAR(../../@)',
+ 'ethernet/node.tag/vif/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
+ 'ethernet/node.tag/vif/node.tag/pppoe/node.tag' => 'pppoe$VAR(../../../@)',
+ 'ethernet/node.tag/vrrp/vrrp-group/node.tag' => '$VAR(../../../../../@)v$VAR(../../../@)',
+ 'input/node.tag' => '$VAR(../../../@)',
+ 'l2tpv3/node.tag' => '$VAR(../../../@)',
+ 'multilink/node.tag/vif/node.tag' => '$VAR(../../../../@)',
+ 'openvpn/node.tag' => '$VAR(../../../@)',
'pseudo-ethernet/node.tag' => '$VAR(../../../@)',
- 'pseudo-ethernet/node.tag/vif/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
'pseudo-ethernet/node.tag/vif-s/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
'pseudo-ethernet/node.tag/vif-s/node.tag/vif-c/node.tag' => '$VAR(../../../../@).$VAR(../../../@).$VAR(../../@)',
-
- 'wireless/node.tag' => '$VAR(../../../@)',
- 'wireless/node.tag/vif/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
-
- 'input/node.tag' => '$VAR(../../../@)',
- 'tunnel/node.tag' => '$VAR(../../../@)',
- 'vti/node.tag' => '$VAR(../../../@)',
- 'bridge/node.tag' => '$VAR(../../../@)',
- 'openvpn/node.tag' => '$VAR(../../../@)',
-
- 'l2tpv3/node.tag' => '$VAR(../../../@)',
-
- 'vxlan/node.tag' => '$VAR(../../../@)',
-
- 'wirelessmodem/node.tag' => '$VAR(../../../@)',
-
- 'dummy/node.tag' => '$VAR(../../../@)'
+ 'pseudo-ethernet/node.tag/vif/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
+ 'tunnel/node.tag' => '$VAR(../../../@)',
+ 'vti/node.tag' => '$VAR(../../../@)',
+ 'vxlan/node.tag' => '$VAR(../../../@)',
+ 'wireless/node.tag' => '$VAR(../../../@)',
+ 'wireless/node.tag/vif/node.tag' => '$VAR(../../../../@).$VAR(../../../@)',
+ 'wirelessmodem/node.tag' => '$VAR(../../../@)',
);
# Firewall node hashes
my %firewall_hash = (
'bonding/node.tag' => 'bonding $VAR(../@)',
- 'bonding/node.tag/vif/node.tag' => 'bonding $VAR(../../../@) vif $VAR(../@)',
'bonding/node.tag/vif-s/node.tag' => 'bonding $VAR(../../../@) vif-s $VAR(../@)',
'bonding/node.tag/vif-s/node.tag/vif-c/node.tag' => 'bonding $VAR(../../../../@) vif-s $VAR(../../@) vif-c $VAR(../@)',
+ 'bonding/node.tag/vif/node.tag' => 'bonding $VAR(../../../@) vif $VAR(../@)',
'bridge/node.tag' => 'bridge $VAR(../@)',
+ 'dummy/node.tag' => 'dummy $VAR(../@)'
'ethernet/node.tag' => 'ethernet $VAR(../@)',
'ethernet/node.tag/pppoe/node.tag' => 'ethernet $VAR(../../@) pppoe $VAR(../@)',
- 'ethernet/node.tag/vif/node.tag' => 'ethernet $VAR(../../../@) vif $VAR(../@)',
- 'ethernet/node.tag/vif/node.tag/pppoe/node.tag' => 'ethernet $VAR(../../../../@) vif $VAR(../../@) pppoe $VAR(../@)',
'ethernet/node.tag/vif-s/node.tag' => 'ethernet $VAR(../../../@) vif-s $VAR(../@)',
'ethernet/node.tag/vif-s/node.tag/vif-c/node.tag' => 'ethernet $VAR(../../../../@) vif-s $VAR(../../@) vif-c $VAR(../@)',
+ 'ethernet/node.tag/vif/node.tag' => 'ethernet $VAR(../../../@) vif $VAR(../@)',
+ 'ethernet/node.tag/vif/node.tag/pppoe/node.tag' => 'ethernet $VAR(../../../../@) vif $VAR(../../@) pppoe $VAR(../@)',
'ethernet/node.tag/vrrp/vrrp-group/node.tag' => 'ethernet $VAR(../../../@) vrrp vrrp-group $VAR(../@)',
'input/node.tag' => 'input $VAR(../@)',
+ 'l2tpv3/node.tag' => 'l2tpv3 $VAR(../@)',
+ 'multilink/node.tag/vif/node.tag' => 'multilink $VAR(../../../@) vif $VAR(../@)',
'openvpn/node.tag' => 'openvpn $VAR(../@)',
'pseudo-ethernet/node.tag' => 'pseudo-ethernet $VAR(../@)',
- 'pseudo-ethernet/node.tag/vif/node.tag' => 'pseudo-ethernet $VAR(../../../@) vif $VAR(../@)',
'pseudo-ethernet/node.tag/vif-s/node.tag' => 'pseudo-ethernet $VAR(../../../@) vif-s $VAR(../@)',
'pseudo-ethernet/node.tag/vif-s/node.tag/vif-c/node.tag' => 'pseudo-ethernet $VAR(../../../../@) vif-s $VAR(../../@) vif-c $VAR(../@)',
+ 'pseudo-ethernet/node.tag/vif/node.tag' => 'pseudo-ethernet $VAR(../../../@) vif $VAR(../@)',
'tunnel/node.tag' => 'tunnel $VAR(../@)',
'vti/node.tag' => 'vti $VAR(../@)',
+ 'vxlan/node.tag' => 'vxlan $VAR(../@)'
'wireless/node.tag' => 'wireless $VAR(../@)',
'wireless/node.tag/vif/node.tag' => 'wireless $VAR(../../../@) vif $VAR(../@)',
'wirelessmodem/node.tag' => 'wirelessmodem $VAR(../@)',
- 'l2tpv3/node.tag' => 'l2tpv3 $VAR(../@)',
- 'vxlan/node.tag' => 'vxlan $VAR(../@)',
- 'dummy/node.tag' => 'dummy $VAR(../@)'
);
# Hash table to check if the priority needs to set @ root