summaryrefslogtreecommitdiff
path: root/templates/system/static-host-mapping
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/static-host-mapping')
-rw-r--r--templates/system/static-host-mapping/host-name/node.def3
-rw-r--r--templates/system/static-host-mapping/host-name/node.tag/inet/node.def7
2 files changed, 3 insertions, 7 deletions
diff --git a/templates/system/static-host-mapping/host-name/node.def b/templates/system/static-host-mapping/host-name/node.def
index 04abf871..693b5592 100644
--- a/templates/system/static-host-mapping/host-name/node.def
+++ b/templates/system/static-host-mapping/host-name/node.def
@@ -1,10 +1,11 @@
tag:
type: txt
-help: Map host name to address
+help: Host name for static address mapping
syntax:expression: pattern $VAR(@) "^[[:alnum:]][-.[:alnum:]]*[[:alnum:]]$"
; "invalid host name $VAR(@)"
+
commit:expression: $VAR(./inet) != ""; "IP address for the static mapping must be set"
end: sudo sh -c "
diff --git a/templates/system/static-host-mapping/host-name/node.tag/inet/node.def b/templates/system/static-host-mapping/host-name/node.tag/inet/node.def
index db66bfd1..d6c0b466 100644
--- a/templates/system/static-host-mapping/host-name/node.tag/inet/node.def
+++ b/templates/system/static-host-mapping/host-name/node.tag/inet/node.def
@@ -1,7 +1,2 @@
-type: txt
+type: ipv4, ipv6
help: Address [REQUIRED]
-syntax:expression: exec "/opt/vyatta/sbin/check-ipv4-ipv6.pl $VAR(@)"
-
-comp_help: Possible completions:
- <ipv4> Set IPv4 address
- <ipv6> Set IPv6 address