summaryrefslogtreecommitdiff
path: root/templates/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces')
-rw-r--r--templates/interfaces/vxlan/node.def5
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/interfaces/vxlan/node.def b/templates/interfaces/vxlan/node.def
index f5f99af7..f7c9b7c7 100644
--- a/templates/interfaces/vxlan/node.def
+++ b/templates/interfaces/vxlan/node.def
@@ -17,6 +17,7 @@ begin:
create:
if [ -e /sys/class/net/$VAR(@) ]; then
echo "VXLAN interface \"$VAR(@)\" already exists."
+ exit 1
fi
VXLAN_VNI="id $VAR(./vni/@)"
@@ -37,10 +38,10 @@ create:
delete:
if [ ! -e /sys/class/net/$VAR(@) ]; then
echo "VXLAN interface \"$VAR(@)\" does not exist."
+ else
+ ip link del dev $VAR(@)
fi
- ip link del dev $VAR(@)
-
end:
if [ -e /tmp/vxlan-$VAR(@)-create ]; then