summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstall/tools/ipa-server-install6
1 files changed, 4 insertions, 2 deletions
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 1dbeef596..4c56b6617 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -754,10 +754,14 @@ def main():
# Check we have a public IP that is associated with the hostname
hostaddr = resolve_host(host_name)
+ ip_add_to_hosts = False
if hostaddr is not None:
ip = CheckedIPAddress(hostaddr, match_local=True)
else:
+ # hostname is not resolvable
ip = options.ip_address
+ ip_add_to_hosts = True
+
if ip is None:
print "Unable to resolve IP address for host name"
if options.unattended:
@@ -772,11 +776,9 @@ def main():
ip = options.ip_address
- ip_add_to_hosts = False
if ip is None:
ip = read_ip_address(host_name, fstore)
logging.debug("read ip_address: %s\n" % str(ip))
- ip_add_to_hosts = True
ip_address = str(ip)