summaryrefslogtreecommitdiff
path: root/templates/interfaces/bonding
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces/bonding')
-rw-r--r--templates/interfaces/bonding/node.tag/vif/node.def4
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(@)