From cd60daa6f1ee2c6b13343d41c22916110eedae9c Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sat, 13 Apr 2013 00:18:22 +0000 Subject: Configure nodename --- install | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'install') diff --git a/install b/install index b69b1b8..9271702 100755 --- a/install +++ b/install @@ -684,6 +684,35 @@ swap - /tmp tmpfs - y except: pass +# http://stackoverflow.com/questions/2532053/validate-a-hostname-string +def isValidNodename(hostname): + if len(hostname) > 63: + return False + allowed = re.compile("(?!-)[A-Z\d-]{1,63}(?