summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet/node.def
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-03 16:25:24 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-03 16:25:24 -0700
commit2619f6c8fa01ab3ade6dfe6edb6815825c89cfd0 (patch)
tree1ab7ed9d119588d4de8a47915961b22953a3c2a8 /templates/interfaces/ethernet/node.def
parentad4f2a101203e71076a3e23a0a2a093326927d45 (diff)
downloadvyatta-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.def3
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