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.def8
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/interfaces/vti/node.def b/templates/interfaces/vti/node.def
index 9a5120a6..15ea2e3e 100644
--- a/templates/interfaces/vti/node.def
+++ b/templates/interfaces/vti/node.def
@@ -4,7 +4,7 @@ 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)"
+ ; "vti must be (vti0-vti999..)"
begin:
if [ "${COMMIT_ACTION}" == DELETE ]; then
@@ -15,6 +15,12 @@ if [ "${COMMIT_ACTION}" == DELETE ]; then
exit -1
fi
fi
+if [ "${COMMIT_ACTION}" == SET ]; then
+ `${vyatta_sbindir}/vyatta-vti-config.pl --checkref --intf=$VAR(@)`
+ if [ $? -eq 0 ]; then
+ echo "Warning: Interface $VAR(@) is not referenced in vpn configuration."
+ fi
+fi
delete:
if [ -d /sys/class/net/$VAR(@) ] ; then