summaryrefslogtreecommitdiff
path: root/templates/interfaces/vti/node.def
blob: 0d9c422d2d963838f983da6d1caf3989f7d7ebc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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