diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-11 15:58:50 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-02-11 15:58:50 -0800 |
commit | 642fd0b4893cd5afebafb58c82e418f12fdbf170 (patch) | |
tree | 5ff2bb5f33a50012436e76d7b993cd61dbce8aac /templates/protocols/ospf | |
parent | 2ba836d922e7393a3d3e3715b7fd94c4b7ef6622 (diff) | |
download | vyatta-cfg-quagga-642fd0b4893cd5afebafb58c82e418f12fdbf170.tar.gz vyatta-cfg-quagga-642fd0b4893cd5afebafb58c82e418f12fdbf170.zip |
OSPF: allow any type interface
Bugfix 4014
Allow any interface name that might be configurable for passive-interface
Diffstat (limited to 'templates/protocols/ospf')
-rw-r--r-- | templates/protocols/ospf/passive-interface/node.def | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/templates/protocols/ospf/passive-interface/node.def b/templates/protocols/ospf/passive-interface/node.def index 480d084e..841bd340 100644 --- a/templates/protocols/ospf/passive-interface/node.def +++ b/templates/protocols/ospf/passive-interface/node.def @@ -1,31 +1,17 @@ multi: type: txt help: Set to suppress routing updates on an interface -syntax:expression: exec " \ - if [ -z \"`ip addr | grep $VAR(@) `\" ] && [ x$VAR(@) != xdefault ]; then \ - echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \ - exit 1 ; \ - fi ; " -update:expression: " \ - if [ x$VAR(x) == xdefault ]; then \ - vyatta-vtysh -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"passive-interface default\"; \ - else \ - vyatta-vtysh -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"passive-interface $VAR(@)\"; \ - fi; " -delete:expression: " \ - if [ x$VAR(x) == xdefault ]; then \ - vyatta-vtysh -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no passive-interface default\"; \ - else \ - vyatta-vtysh -c \"configure terminal\" \ - -c \"router ospf\" \ - -c \"no passive-interface $VAR(@)\"; \ - fi; " -allowed: local -a array; - array=( /sys/class/net/{eth,vmnet}* ) ; - echo -n ${array[@]##*/} +syntax:expression: exec "${vyatta_sbindir}/vyatta-interfaces.pl --check $VAR(@)" +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all +update: if [ -z $VAR(@) ] + then vyatta-vtysh -c "configure terminal" -c "router ospf" \ + -c "passive-interface default"; + else vyatta-vtysh -c "configure terminal" -c "router ospf" \ + -c "passive-interface $VAR(@)" + fi +delete: if [ -z $VAR(@) ] + then vyatta-vtysh -c "configure terminal" -c "router ospf" \ + -c "no passive-interface default" + else vyatta-vtysh -c "configure terminal" -c "router ospf" \ + -c "no passive-interface $VAR(@)" + fi |