diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-03 16:25:24 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2009-06-12 15:19:00 -0700 |
commit | b5253c5041a1fd0b45dbf992cb6c60df109d6927 (patch) | |
tree | 0148b0aab0d0ef79cecec31853ecf0db9674beb0 /templates/interfaces/ethernet/node.def | |
parent | 42745536c2c960c84e4d928b1a32dd350298bb16 (diff) | |
download | vyatta-cfg-b5253c5041a1fd0b45dbf992cb6c60df109d6927.tar.gz vyatta-cfg-b5253c5041a1fd0b45dbf992cb6c60df109d6927.zip |
Allow delete of ethernet settings when device does not exist
More bug 3952 fixes
(cherry picked from commit 2619f6c8fa01ab3ade6dfe6edb6815825c89cfd0)
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 |