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/ethernet | |
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/ethernet')
-rw-r--r-- | templates/interfaces/ethernet/node.def | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def index 55d0a85..c231b74 100644 --- a/templates/interfaces/ethernet/node.def +++ b/templates/interfaces/ethernet/node.def @@ -1,14 +1,9 @@ tag: type: txt help: Set ethernet interface -syntax:expression: pattern $VAR(@) "^eth[0-9]+$" \ - ; "interface must be (eth0 - eth999)" -syntax:expression: exec " \ - if [ -f /sys/class/net/$VAR(@) ]; then \ - echo \"Ethernet interface does not exist: $VAR(@)\"; \ - exit 1; \ - fi" -allowed: /opt/vyatt/sbin/vyatta-interfaces.pl --show=ethernet +syntax:expression: exec \ + "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=ethernet" +allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet update: sudo ip link set "$VAR(@)" up /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on delete: sudo ip link set "$VAR(@)" down |