diff options
Diffstat (limited to 'templates/interfaces/l2tpv3')
-rw-r--r-- | templates/interfaces/l2tpv3/node.tag/address/node.def | 12 | ||||
-rw-r--r-- | templates/interfaces/l2tpv3/node.tag/description/node.def | 8 | ||||
-rw-r--r-- | templates/interfaces/l2tpv3/node.tag/disable/node.def | 4 |
3 files changed, 24 insertions, 0 deletions
diff --git a/templates/interfaces/l2tpv3/node.tag/address/node.def b/templates/interfaces/l2tpv3/node.tag/address/node.def new file mode 100644 index 00000000..04612379 --- /dev/null +++ b/templates/interfaces/l2tpv3/node.tag/address/node.def @@ -0,0 +1,12 @@ +multi: +type: ipv4net,ipv6net +val_help: ipv4net; IPv4 address and prefix length +val_help: ipv6net; IPv6 address and prefix length +help: IP address + +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" + +create: sudo /opt/vyatta/sbin/vyatta-address add $VAR(../@) $VAR(@) + +delete: sudo /opt/vyatta/sbin/vyatta-address delete $VAR(../@) $VAR(@) + diff --git a/templates/interfaces/l2tpv3/node.tag/description/node.def b/templates/interfaces/l2tpv3/node.tag/description/node.def new file mode 100644 index 00000000..c6d2789d --- /dev/null +++ b/templates/interfaces/l2tpv3/node.tag/description/node.def @@ -0,0 +1,8 @@ +type: txt +help: Description + +syntax:expression: pattern $VAR(@) "^.{1,256}$" \ + ; "interface description is too long (limit 256 characters)" + +update: sudo sh -c "echo \"$VAR(@)\" >/sys/class/net/$VAR(../@)/ifalias" +delete: sudo sh -c "echo '' >/sys/class/net/$VAR(../@)/ifalias" diff --git a/templates/interfaces/l2tpv3/node.tag/disable/node.def b/templates/interfaces/l2tpv3/node.tag/disable/node.def new file mode 100644 index 00000000..26199646 --- /dev/null +++ b/templates/interfaces/l2tpv3/node.tag/disable/node.def @@ -0,0 +1,4 @@ +help: Disable interface +update: ip link set $VAR(../@) down + +delete: ip link set $VAR(../@) up |