From b43a38e9cbdd376dda17a2b2079ac8051d884030 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Tue, 6 Sep 2011 12:55:40 +0200 Subject: Check that install hostname matches the server hostname. ticket 1717 --- ipaserver/install/installutils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ipaserver') diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index 57601d7af..d9b391f38 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 -- cgit