mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Include more information when IP address is not local during installation.
Provide the IP address we resolved when displaying the exception. Also handle the exception ourselves with sys.exit(). https://fedorahosted.org/freeipa/ticket/2654
This commit is contained in:
parent
02b942a72e
commit
eef056165f
@ -574,7 +574,10 @@ def get_server_ip_address(host_name, fstore, unattended, options):
|
|||||||
else:
|
else:
|
||||||
ip = read_ip_address(host_name, fstore)
|
ip = read_ip_address(host_name, fstore)
|
||||||
elif len(hostaddr) == 1:
|
elif len(hostaddr) == 1:
|
||||||
ip = ipautil.CheckedIPAddress(hostaddr[0], match_local=True)
|
try:
|
||||||
|
ip = ipautil.CheckedIPAddress(hostaddr[0], match_local=True)
|
||||||
|
except ValueError, e:
|
||||||
|
sys.exit("Invalid IP Address %s for %s: %s" % (hostaddr[0], host_name, unicode(e)))
|
||||||
else:
|
else:
|
||||||
# hostname is not resolvable
|
# hostname is not resolvable
|
||||||
ip = options.ip_address
|
ip = options.ip_address
|
||||||
|
Loading…
Reference in New Issue
Block a user