summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorStanislav Laznicka <slaznick@redhat.com>2015-08-11 10:10:48 +0200
committerMartin Basti <mbasti@redhat.com>2015-08-14 11:03:04 +0200
commitd55e10f4bda77c65663386a0748723df3518cb6d (patch)
treeacf42858723c8432b43f96a4eabcb834969de836 /ipa-client
parent06d68b447ff62b64a3a6e4a3c565fcf406a457ec (diff)
downloadfreeipa-d55e10f4bda77c65663386a0748723df3518cb6d.tar.gz
freeipa-d55e10f4bda77c65663386a0748723df3518cb6d.tar.xz
freeipa-d55e10f4bda77c65663386a0748723df3518cb6d.zip
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>
Diffstat (limited to 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install19
1 files changed, 19 insertions, 0 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 91323ae11..4a121047d 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -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