From 5f69f227f7cf0cb2f60330e9157015abfe25ee8c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 17 Nov 2010 09:24:54 -0800 Subject: Allow longer domain-name values Bug 6243 Change syntax checking for domain name. Don't enforce length restrictions since that is checked already elsewhere and may change. Do enforce the RFC 2181 character set values. --- templates/system/domain-name/node.def | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/system/domain-name/node.def b/templates/system/domain-name/node.def index ff3c2ebf..e5d5af7e 100644 --- a/templates/system/domain-name/node.def +++ b/templates/system/domain-name/node.def @@ -1,7 +1,9 @@ priority: 400 type: txt help: System domain name -syntax:expression: pattern $VAR(@) "^[-a-zA-Z0-9.]{0,63}$" ; "invalid domain name $VAR(@)" + +# Allow letter-number-hyphen in label (but can not start or end with hyphen) +syntax:expression: pattern $VAR(@) "^[a-zA-Z0-9](([-a-zA-Z0-9]*[a-zA-Z0-9])?\.)*[a-zA-Z]+$" ; "invalid domain name $VAR(@)" # also add localhost line into /etc/hosts (see host-name template)? update: sudo /opt/vyatta/sbin/vyatta_update_resolv.pl -- cgit v1.2.3