summaryrefslogtreecommitdiff
path: root/templates/interfaces/vti/node.def
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interfaces/vti/node.def')
-rw-r--r--templates/interfaces/vti/node.def19
1 files changed, 19 insertions, 0 deletions
diff --git a/templates/interfaces/vti/node.def b/templates/interfaces/vti/node.def
new file mode 100644
index 00000000..0d9c422d
--- /dev/null
+++ b/templates/interfaces/vti/node.def
@@ -0,0 +1,19 @@
+tag:
+priority: 381
+type: txt
+help: Virtual Tunnel interface
+val_help: <vtiN>; Virtual Tunnel interface name
+syntax:expression: pattern $VAR(@) "^vti[0-9]+$" \
+ ; "vti must be (vti-vti999)"
+
+delete:
+ if [ -d /sys/class/net/$VAR(@) ] ; then
+ ip link set $VAR(@) down
+ ip tunnel del $VAR(@) mode esp
+ fi
+
+end:
+if [ "${COMMIT_ACTION}" == DELETE ]; then
+ /opt/vyatta/sbin/vyatta-tunnel-cleanup $VAR(@)
+fi
+