diff options
author | Daniil Baturin <daniil@baturin.org> | 2014-04-12 08:12:51 -0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2014-04-12 08:12:51 -0700 |
commit | 869d864c2a5c82703230c317ab6119c47ad7b618 (patch) | |
tree | b744e680d9f2923133cf070ba5b24a8d71b6da5b /templates/interfaces/l2tpv3 | |
parent | 4fb463c1e0f61fc449802d4d2d42d9b0c6623c94 (diff) | |
download | vyatta-cfg-system-869d864c2a5c82703230c317ab6119c47ad7b618.tar.gz vyatta-cfg-system-869d864c2a5c82703230c317ab6119c47ad7b618.zip |
Bug #170: Add address, disable, and description 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 |