summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-03 13:25:56 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-03-03 13:25:56 -0800
commit6fb63ac4b13a625093646476646173559e4fea8b (patch)
tree1b1df80c0495c0d0e8d72020310912d7a136b5ad
parentf93b4f58b570d49fc28ad739487388d3933aff5a (diff)
downloadvyatta-cfg-system-6fb63ac4b13a625093646476646173559e4fea8b.tar.gz
vyatta-cfg-system-6fb63ac4b13a625093646476646173559e4fea8b.zip
allow numbers in hostname
Last commit blocked names like "test1", proper expression from RFC 952 is: <hname> ::= <name>*["."<name>] <name> ::= <let>[*[<let-or-digit-or-hyphen>]<let-or-digit>]
-rw-r--r--templates/system/host-name/node.def2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/system/host-name/node.def b/templates/system/host-name/node.def
index 437a939d..1aba2174 100644
--- a/templates/system/host-name/node.def
+++ b/templates/system/host-name/node.def
@@ -1,7 +1,7 @@
type: txt
help: Configure system host name
default: "vyatta"
-syntax:expression: pattern $VAR(@) "^[[:alpha:]][-.[:alpha:]]*[[:alpha:]]$"
+syntax:expression: pattern $VAR(@) "^[[:alpha:]][-.[:alnum:]]*[[:alnum:]]$"
; "invalid host name $VAR(@)"
update: sudo sh -c " \
hostname '$VAR(@)'