diff options
Diffstat (limited to 'templates')
8 files changed, 16 insertions, 17 deletions
diff --git a/templates/interfaces/bonding/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/address/node.def index f577320b..8956dba6 100644 --- a/templates/interfaces/bonding/node.tag/address/node.def +++ b/templates/interfaces/bonding/node.tag/address/node.def @@ -2,8 +2,7 @@ multi: type: txt help: IP address -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"\ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../@)" diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def index ed95f20d..236e6ae5 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/address/node.def @@ -2,8 +2,7 @@ multi: type: txt help: IP address -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../../@).$VAR(../@) "\ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)" +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../@).$VAR(../@)" diff --git a/templates/interfaces/bridge/node.tag/address/node.def b/templates/interfaces/bridge/node.tag/address/node.def index 4644ad8d..cb08069e 100644 --- a/templates/interfaces/bridge/node.tag/address/node.def +++ b/templates/interfaces/bridge/node.tag/address/node.def @@ -2,9 +2,11 @@ multi: priority: 320 type: txt help: IP address -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)";\ - "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" + +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" + create: sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@) + delete: if /opt/vyatta/sbin/vyatta-bridgegroup-depedency.pl \ --bridge-notin-proposedcfg \ @@ -16,6 +18,7 @@ delete: else sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@) fi + allowed: echo "dhcp <>" val_help: ipv4net; IP address and prefix length val_help: ipv6net; IPv6 address and prefix length diff --git a/templates/interfaces/ethernet/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/address/node.def index dfacdb2d..c1bd8fc8 100644 --- a/templates/interfaces/ethernet/node.tag/address/node.def +++ b/templates/interfaces/ethernet/node.tag/address/node.def @@ -1,11 +1,8 @@ multi: - type: txt - help: IP address -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"\ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../@)" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def index 5b2f38dd..535fa6d2 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def @@ -2,8 +2,7 @@ multi: type: txt help: IP address -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../../@).$VAR(../@) "\ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../../@).$VAR(../@)" +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr-commit $VAR(@@) --dev $VAR(../../@).$VAR(../@)" diff --git a/templates/interfaces/loopback/node.tag/address/node.def b/templates/interfaces/loopback/node.tag/address/node.def index 969ecf26..c0ec9386 100644 --- a/templates/interfaces/loopback/node.tag/address/node.def +++ b/templates/interfaces/loopback/node.tag/address/node.def @@ -4,8 +4,7 @@ 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/vyatta-interfaces.pl --valid-addr-set $VAR(@) --dev $VAR(../@)"; \ - "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" create:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; \ "Error setting address $VAR(@) on interface $VAR(../@)" diff --git a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def index 42e79606..ad900975 100644 --- a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def +++ b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def @@ -1,10 +1,13 @@ multi: type: txt help: IP address -syntax:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)" \ - ; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" + +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" + create:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@) + delete:sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $VAR(@) --dev $VAR(../@) + allowed: echo "dhcp <>" val_help: ipv4net; IP address and prefix length diff --git a/templates/interfaces/tunnel/node.tag/address/node.def b/templates/interfaces/tunnel/node.tag/address/node.def index 6cd40ece..e6a1e542 100644 --- a/templates/interfaces/tunnel/node.tag/address/node.def +++ b/templates/interfaces/tunnel/node.tag/address/node.def @@ -4,7 +4,7 @@ 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/vyatta-interfaces.pl --valid-addr $VAR(@) --dev $VAR(../@)"; "Invalid IP address/prefix [$VAR(@)] for interface $VAR(../@)" +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" create:expression: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $VAR(@) --dev $VAR(../@)"; "Error setting address $VAR(@) on interface $VAR(../@)" |