summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-09-06 12:55:40 +0200
committerRob Crittenden <rcritten@redhat.com>2011-09-14 22:42:24 -0400
commit5f9d81e7c83ba8f9be66309a99bfd03b6cdf096e (patch)
tree237361934df19151e8b00e3e26a118e6125e2eeb /ipaserver
parentb3748cd1f7f17ca8d1ab37a7664493daf0abbadd (diff)
downloadfreeipa-5f9d81e7c83ba8f9be66309a99bfd03b6cdf096e.tar.gz
freeipa-5f9d81e7c83ba8f9be66309a99bfd03b6cdf096e.tar.xz
freeipa-5f9d81e7c83ba8f9be66309a99bfd03b6cdf096e.zip
Check that install hostname matches the server hostname.
ticket 1717
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/installutils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index ce36a4241..63326c530 100644
--- a/ipaserver/install/installutils.py
+++ b/ipaserver/install/installutils.py
@@ -127,6 +127,11 @@ def verify_fqdn(host_name,no_host_dns=False):
if ipautil.valid_ip(host_name):
raise RuntimeError("IP address not allowed as a hostname")
+ system_host_name = socket.gethostname()
+ if not (host_name + '.').startswith(system_host_name + '.'):
+ print "Warning: The host name '%s' does not match the system host name '%s'." % (host_name, system_host_name)
+ print " Some services may not work properly."
+
if no_host_dns:
print "Warning: skipping DNS resolution of host", host_name
return