summaryrefslogtreecommitdiff
path: root/templates/interfaces/vxlan
diff options
context:
space:
mode:
authorupa <upa@sfc.wide.ad.jp>2014-08-26 15:13:51 +0900
committerupa <upa@sfc.wide.ad.jp>2014-08-26 15:13:51 +0900
commit3d515e3cc128a6cd47c399ff01f49f733e3eafbd (patch)
tree7248c11ebfce0b796019b49fcfbd95734cff4c04 /templates/interfaces/vxlan
parentf4db3c0c67e38ad8b685915c6bbe6692e734528a (diff)
downloadvyatta-cfg-system-3d515e3cc128a6cd47c399ff01f49f733e3eafbd.tar.gz
vyatta-cfg-system-3d515e3cc128a6cd47c399ff01f49f733e3eafbd.zip
fix create/del error handling
Diffstat (limited to 'templates/interfaces/vxlan')
-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