On 7.9.2011 15:13, Rob Crittenden wrote:
Jan Cholasta wrote:
On 6.9.2011 19:49, Rob Crittenden wrote:
Jan Cholasta wrote:
https://fedorahosted.org/freeipa/ticket/1717

Honza

nack, what if there are multiple interfaces and you want IPA to use one
(that doesn't happen to be the system hostname one)?

rob

Then the user configures the system hostname to match the hostname of
the interface. Or should we configure it automatically from the install?

Honza


We can't dictate which interface matches the hostname. At most we can
warn about this, but not fail to install.

rob

Changed to print a warning message instead of raising an error.

Honza

--
Jan Cholasta
>From b90fea755d1f207cdd98d315d7c2ac55868ae596 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Tue, 6 Sep 2011 12:55:40 +0200
Subject: [PATCH] Check that install hostname matches the server hostname.

ticket 1717
---
 ipaserver/install/installutils.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py
index fd978e7..a2ea57f 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
-- 
1.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to