summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2007-11-27 10:37:15 -0800
committerStig Thormodsrud <stig@vyatta.com>2007-11-27 10:37:15 -0800
commitfae7c4099efc2f247ed9eb4a52f3839bcedf987a (patch)
tree07c0a7c5a20c5d86c0cfbdfa2801a261c2741194 /templates
parent65b95aa0fd0210501bd828299f561925269b6321 (diff)
downloadvyatta-cfg-fae7c4099efc2f247ed9eb4a52f3839bcedf987a.tar.gz
vyatta-cfg-fae7c4099efc2f247ed9eb4a52f3839bcedf987a.zip
Fix 2497: check for duplicate ip address.
Also while we're add it, allow user to set an ipv6 address or get address from dhcp.
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/ethernet/node.tag/address/node.def7
-rw-r--r--templates/interfaces/ethernet/node.tag/vif/node.tag/address/node.def9
2 files changed, 9 insertions, 7 deletions
diff --git a/templates/interfaces/ethernet/node.tag/address/node.def b/templates/interfaces/ethernet/node.tag/address/node.def
index 83ce62f..9447c99 100644
--- a/templates/interfaces/ethernet/node.tag/address/node.def
+++ b/templates/interfaces/ethernet/node.tag/address/node.def
@@ -1,5 +1,6 @@
multi:
-type: ipv4net
+type: txt
help: "Set IPv4 address and prefix for this interface"
-update: "sudo ip addr add $(@) broadcast + dev $(../@)"; "Error setting address $(@) on dev $(../@)"
-delete: "sudo ip addr del $(@) dev $(../@)"; "Error deleting address $(@) on dev $(../@)"
+syntax: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $(@) --dev $(../@)"
+create: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $(@) --dev $(../@)"; "Error setting address $(@) on dev $(../@)"
+delete: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $(@) --dev $(../@)"; "Error deleting address $(@) on dev $(../@)"
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 08bf3ea..a3c0b5c 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
@@ -1,5 +1,6 @@
multi:
-type: ipv4net
-help: "Set IPv4 address and prefix for this interface"
-update: "sudo ip addr add $(@) dev $(../../@).$(../@)"; "Error setting address $(@) on dev $(../../@).$(../@)"
-delete: "sudo ip addr del $(@) dev $(../../@).$(../@)"; "Error deleting address $(@) on dev $(../../@).$(../@)"
+type: txt
+help: "Set IPv4 address and prefix for this vif interface"
+syntax: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --valid-addr $(@) --dev $(../../@).$(../@) "
+create: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-update $(@) --dev $(../../@).$(../@) "; "Error setting address $(@) on dev $(../../@) $(../@) "
+delete: "sudo /opt/vyatta/sbin/vyatta-interfaces.pl --eth-addr-delete $(@) --dev $(../../@).$(../@) "; "Error deleting address $(@) on dev $(../../@).$(../@) "