diff options
Diffstat (limited to 'templates/protocols/rip/passive-interface/node.def')
-rw-r--r-- | templates/protocols/rip/passive-interface/node.def | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/templates/protocols/rip/passive-interface/node.def b/templates/protocols/rip/passive-interface/node.def index 1663df1b..09039331 100644 --- a/templates/protocols/rip/passive-interface/node.def +++ b/templates/protocols/rip/passive-interface/node.def @@ -6,20 +6,16 @@ syntax:expression: exec " \ 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 rip\" \ - -c \"passive-interface default\"; \ - else \ - vyatta-vtysh -c \"configure terminal\" -c \"router rip\" \ - -c \"passive-interface $VAR(@)\"; \ - fi; " -delete:expression: "if [ x$VAR(x) == xdefault ]; then \ - vyatta-vtysh -c \"configure terminal\" -c \"router rip\" \ - -c \"no passive-interface default\"; \ - else \ - vyatta-vtysh -c \"configure terminal\" -c \"router rip\" \ - -c \"no passive-interface $VAR(@)\"; \ - fi; " -allowed: local -a array; - array=( /sys/class/net/{eth,vmnet}* ) ; - echo -n ${array[@]##*/} +update: if [ x$VAR(x) == xdefault ] + then vyatta-vtysh -c "configure terminal" -c "router rip" \ + -c "passive-interface default" + else vyatta-vtysh -c "configure terminal" -c "router rip" \ + -c "passive-interface $VAR(@)" + fi +delete: if [ x$VAR(x) == xdefault ] + then vyatta-vtysh -c "configure terminal" -c "router rip" \ + -c "no passive-interface default" + else vyatta-vtysh -c "configure terminal" -c "router rip" \ + -c "no passive-interface $VAR(@)" + fi +allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all |