mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Check that install hostname matches the server hostname.
ticket 1717
This commit is contained in:
parent
566fa8ddc5
commit
b43a38e9cb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user