summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2009-02-11 16:06:44 -0800
committerStig Thormodsrud <stig@io.vyatta.com>2009-02-11 16:06:44 -0800
commit1e2eea6091a619b8ac8d2c3b08bae5283bebb636 (patch)
tree22d9a75e0ce93c7115fe6eba0b726548991bca55
parent79dd5282b0462b3b116248821a58cdfc0a597812 (diff)
parent642fd0b4893cd5afebafb58c82e418f12fdbf170 (diff)
downloadvyatta-cfg-quagga-1e2eea6091a619b8ac8d2c3b08bae5283bebb636.tar.gz
vyatta-cfg-quagga-1e2eea6091a619b8ac8d2c3b08bae5283bebb636.zip
Merge branch 'jenner' of http://git.vyatta.com/vyatta-cfg-quagga into jenner
-rw-r--r--templates/protocols/ospf/passive-interface/node.def42
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