diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-03 16:25:24 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-03 16:25:24 -0700 |
commit | 2619f6c8fa01ab3ade6dfe6edb6815825c89cfd0 (patch) | |
tree | 1ab7ed9d119588d4de8a47915961b22953a3c2a8 /templates/interfaces/ethernet/node.def | |
parent | ad4f2a101203e71076a3e23a0a2a093326927d45 (diff) | |
download | vyatta-cfg-2619f6c8fa01ab3ade6dfe6edb6815825c89cfd0.tar.gz vyatta-cfg-2619f6c8fa01ab3ade6dfe6edb6815825c89cfd0.zip |
Allow delete of ethernet settings when device does not exist
More bug 3952 fixes
Diffstat (limited to 'templates/interfaces/ethernet/node.def')
-rw-r--r-- | templates/interfaces/ethernet/node.def | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def index d4e86c4..e53bbdb 100644 --- a/templates/interfaces/ethernet/node.def +++ b/templates/interfaces/ethernet/node.def @@ -6,4 +6,5 @@ syntax:expression: exec \ allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=ethernet create: sudo ip link set "$VAR(@)" up /opt/vyatta/sbin/vyatta-link-detect $VAR(@) on -delete: sudo ip link set "$VAR(@)" down +delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 + sudo ip link set $VAR(@) down |