summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-02-13 11:34:28 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-02-13 11:34:28 -0800
commit9773974965c7b639a125b44be3728d00af48e929 (patch)
treecec7818e22ee6ebc3a7613fc3081f67fb8cf0a7d /templates
parent5db776a29c90d05f864645e7e171840660f4b268 (diff)
parent0733bceb217bca1ceb094fb124b89c53cb7cdd25 (diff)
downloadvyatta-cfg-quagga-9773974965c7b639a125b44be3728d00af48e929.tar.gz
vyatta-cfg-quagga-9773974965c7b639a125b44be3728d00af48e929.zip
Merge branch 'jenner' of suva.vyatta.com:/git/vyatta-cfg-quagga into jenner
Conflicts: scripts/vyatta-protocol
Diffstat (limited to 'templates')
-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