diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-11 15:59:48 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-11 16:07:16 -0800 |
commit | b35b69d728d1210153a3e23d25b7b4c96aba0f51 (patch) | |
tree | 10865f2e277be1bb0be5009a5604143ca5d0a015 /templates/interfaces/bonding | |
parent | 799354c7b9fd06fe8ebe8a36dde14cfa3f93d610 (diff) | |
download | vyatta-cfg-system-b35b69d728d1210153a3e23d25b7b4c96aba0f51.tar.gz vyatta-cfg-system-b35b69d728d1210153a3e23d25b7b4c96aba0f51.zip |
Add more checks on VLAN
Bug 4695
If ethernet hardware does not allow VLAN's than produce error.
Ignore delete if device doesn't exist.
Diffstat (limited to 'templates/interfaces/bonding')
-rw-r--r-- | templates/interfaces/bonding/node.tag/vif/node.def | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/interfaces/bonding/node.tag/vif/node.def b/templates/interfaces/bonding/node.tag/vif/node.def index 5d6a5478..35a00835 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.def @@ -13,4 +13,6 @@ create: read -a SLAVES </sys/class/net/$VAR(../@)/bonding/slaves ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) || exit 1 ip link set "$VAR(../@).$VAR(@)" up sudo sh -c "/opt/vyatta/sbin/vyatta-link-detect $VAR(../@).$VAR(@) on" -delete: ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@) + +delete: [ -d /sys/class/net/$VAR(../@).$VAR(@) ] || exit 0 + ip link delete dev "$VAR(../@).$VAR(@)" type vlan id $VAR(@) |