diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-03 08:42:36 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-03-03 08:47:23 -0800 |
commit | 76df8018fe0f0648abc58bd7a988ffaf61e75106 (patch) | |
tree | eda512e78e0d8d0e8b161a25231d50530f0d48f5 /templates/interfaces/loopback/node.def | |
parent | a919283f045a10bfd047f28b1bd720bf53a0058e (diff) | |
download | vyatta-cfg-76df8018fe0f0648abc58bd7a988ffaf61e75106.tar.gz vyatta-cfg-76df8018fe0f0648abc58bd7a988ffaf61e75106.zip |
Use check option to vyatta-interfaces.pl
Eliminate checks in template in favor of doing it in one place
in vyatta-interfaces.pl code.
Diffstat (limited to 'templates/interfaces/loopback/node.def')
-rw-r--r-- | templates/interfaces/loopback/node.def | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/templates/interfaces/loopback/node.def b/templates/interfaces/loopback/node.def index e57f4b1..690dc39 100644 --- a/templates/interfaces/loopback/node.def +++ b/templates/interfaces/loopback/node.def @@ -1,14 +1,7 @@ tag: type: txt help: Set loopback interface -allowed: echo "lo" -syntax:expression: exec "\ - if [ ! -d /sys/class/net/$VAR(@) ]; then \ - echo \"loopback interface $VAR(@) does not exist\"; \ - exit 1; \ - elif [ $(cat /sys/class/net/$VAR(@)/type) -ne 772 ]; then \ - echo \"interface $VAR(@) is not a loopback interface\"; \ - exit 1; \ - fi" - +syntax:expression: exec \ + "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=loopback" +allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=loopback update: sudo ip link set $VAR(@) up |