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:
committed by
Rob Crittenden
parent
566fa8ddc5
commit
b43a38e9cb
@@ -127,6 +127,11 @@ def verify_fqdn(host_name,no_host_dns=False):
|
|||||||
if ipautil.valid_ip(host_name):
|
if ipautil.valid_ip(host_name):
|
||||||
raise RuntimeError("IP address not allowed as a hostname")
|
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:
|
if no_host_dns:
|
||||||
print "Warning: skipping DNS resolution of host", host_name
|
print "Warning: skipping DNS resolution of host", host_name
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user