diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-05-28 19:23:03 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-05-28 19:23:03 +0200 |
commit | 9c80b9a30517576267634d202fbe126eca749c12 (patch) | |
tree | c54882d9bff4530a60c951dad993141f5cb7003d /templates/interfaces/vti | |
parent | 844d00df761445b68d4db0a4f4680f8d9ef02b7d (diff) | |
download | vyatta-cfg-system-9c80b9a30517576267634d202fbe126eca749c12.tar.gz vyatta-cfg-system-9c80b9a30517576267634d202fbe126eca749c12.zip |
vti: T1579: migrate to vyos-1x
Diffstat (limited to 'templates/interfaces/vti')
-rw-r--r-- | templates/interfaces/vti/node.def | 35 | ||||
-rw-r--r-- | templates/interfaces/vti/node.tag/address/node.def | 16 | ||||
-rw-r--r-- | templates/interfaces/vti/node.tag/description/node.def | 15 | ||||
-rw-r--r-- | templates/interfaces/vti/node.tag/disable/node.def | 10 | ||||
-rw-r--r-- | templates/interfaces/vti/node.tag/mtu/node.def | 14 |
5 files changed, 0 insertions, 90 deletions
diff --git a/templates/interfaces/vti/node.def b/templates/interfaces/vti/node.def deleted file mode 100644 index 5e8adb07..00000000 --- a/templates/interfaces/vti/node.def +++ /dev/null @@ -1,35 +0,0 @@ -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 (vti0-vti999..)" - -begin: -if [ "${COMMIT_ACTION}" == DELETE ]; then - # check if there is still a reference - `${vyatta_sbindir}/vyatta-vti-config.pl --checkref --intf=$VAR(@)` - if [ $? -gt 0 ] ; then - echo "Interface $VAR(@) is referenced in vpn configuration." - 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 - sudo ip link set $VAR(@) down - sudo ip tunnel del $VAR(@) mode ipip - fi - -end: -if [ "${COMMIT_ACTION}" == DELETE ]; then - /opt/vyatta/sbin/vyatta-tunnel-cleanup $VAR(@) -fi - diff --git a/templates/interfaces/vti/node.tag/address/node.def b/templates/interfaces/vti/node.tag/address/node.def deleted file mode 100644 index 66874711..00000000 --- a/templates/interfaces/vti/node.tag/address/node.def +++ /dev/null @@ -1,16 +0,0 @@ -multi: -type: ipv4net -val_help: ipv4net; IPv4 address and prefix length -help: IP address - -syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" - -create: - if [ -d /sys/class/net/$VAR(../@) ] ; then - sudo /opt/vyatta/sbin/vyatta-address add $VAR(../@) $VAR(@) - fi - -delete: - if [ -d /sys/class/net/$VAR(../@) ] ; then - sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../@) $VAR(@) - fi diff --git a/templates/interfaces/vti/node.tag/description/node.def b/templates/interfaces/vti/node.tag/description/node.def deleted file mode 100644 index 66ca37af..00000000 --- a/templates/interfaces/vti/node.tag/description/node.def +++ /dev/null @@ -1,15 +0,0 @@ -type: txt -help: Description - -syntax:expression: pattern $VAR(@) "^.{1,256}$" \ - ; "interface description is too long (limit 256 characters)" - -update: - if [ -d /sys/class/net/$VAR(../@) ] ; then - sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias" - fi - -delete: - if [ -d /sys/class/net/$VAR(../@) ] ; then - sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias" - fi diff --git a/templates/interfaces/vti/node.tag/disable/node.def b/templates/interfaces/vti/node.tag/disable/node.def deleted file mode 100644 index 32fa4460..00000000 --- a/templates/interfaces/vti/node.tag/disable/node.def +++ /dev/null @@ -1,10 +0,0 @@ -help: Disable interface -update: - if [ -d /sys/class/net/$VAR(../@) ] ; then - sudo ip link set $VAR(../@) down - fi - -delete: - if [ -d /sys/class/net/$VAR(../@) ] ; then - sudo ip link set $VAR(../@) up - fi diff --git a/templates/interfaces/vti/node.tag/mtu/node.def b/templates/interfaces/vti/node.tag/mtu/node.def deleted file mode 100644 index fc6ecfab..00000000 --- a/templates/interfaces/vti/node.tag/mtu/node.def +++ /dev/null @@ -1,14 +0,0 @@ -type: u32 -priority: 382 -help: Maximum Transmission Unit (MTU) -syntax:expression: $VAR(@) >= 68 && $VAR(@) <= 9000; "Must be between 68-9000" -val_help: u32:68-9000; Maximum Transmission Unit (MTU) - -update: - if [ -d /sys/class/net/$VAR(../@) ] ; then - sudo ip link set $VAR(../@) mtu $VAR(@) - fi -delete: - if [ -d /sys/class/net/$VAR(../@) ] ; then - sudo ip link set $VAR(../@) mtu 1500 - fi |