From c7779f898380ed23f839ebad6ac79edba4d46b35 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 19 Jul 2010 12:03:39 -0700 Subject: Revise static-host-mapping Use ipv4,ipv6 for host mapping address which uses internal CLI syntax check. Revise help text to match CLI standard --- templates/system/static-host-mapping/host-name/node.def | 3 ++- .../system/static-host-mapping/host-name/node.tag/inet/node.def | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'templates/system') 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: - Set IPv4 address - Set IPv6 address -- cgit v1.2.3