mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-client-install: warn when IP used in --server
ipa-client-install fails when an IP address is passed to ipa-join instead of a FQDN https://fedorahosted.org/freeipa/ticket/4932 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
e4dff25838
commit
592e437fc7
@@ -2305,6 +2305,25 @@ def install(options, env, fstore, statestore):
|
||||
root_logger.info("BaseDN: %s", cli_basedn)
|
||||
root_logger.debug("BaseDN source: %s", cli_basedn_source)
|
||||
|
||||
# ipa-join would fail with IP address instead of a FQDN
|
||||
for srv in cli_server:
|
||||
try:
|
||||
socket.inet_pton(socket.AF_INET, srv)
|
||||
is_ipaddr = True
|
||||
except:
|
||||
try:
|
||||
socket.inet_pton(socket.AF_INET6, srv)
|
||||
is_ipaddr = True
|
||||
except:
|
||||
is_ipaddr = False
|
||||
|
||||
if is_ipaddr:
|
||||
print
|
||||
root_logger.warning("It seems that you are using an IP address "
|
||||
"instead of FQDN as an argument to --server. The "
|
||||
"installation may fail.")
|
||||
break
|
||||
|
||||
print
|
||||
if not options.unattended and not user_input("Continue to configure the system with these values?", False):
|
||||
return CLIENT_INSTALL_ERROR
|
||||
|
||||
Reference in New Issue
Block a user