summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-dns-install
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-05-31 12:51:38 +0200
committerMartin Kosek <mkosek@redhat.com>2011-06-10 08:29:14 +0200
commit915235859cb67d4f350ff506b435586fd15505e7 (patch)
tree6cd153414ded558f5ed3e987830469d99a6b321d /install/tools/ipa-dns-install
parenta26fb5aacafa91bd67061cb85bc9f0c88b735604 (diff)
downloadfreeipa-915235859cb67d4f350ff506b435586fd15505e7.tar.gz
freeipa-915235859cb67d4f350ff506b435586fd15505e7.tar.xz
freeipa-915235859cb67d4f350ff506b435586fd15505e7.zip
IPA installation with --no-host-dns fails
--no-host-dns option should allow installing IPA server on a host without a DNS resolvable name. Update parse_ip_address and verify_ip_address functions has been changed not to return None and print error messages in case of an error, but rather let the Exception be handled by the calling routine. https://fedorahosted.org/freeipa/ticket/1246
Diffstat (limited to 'install/tools/ipa-dns-install')
-rwxr-xr-xinstall/tools/ipa-dns-install9
1 files changed, 8 insertions, 1 deletions
diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install
index 91edcca8a..39998ac47 100755
--- a/install/tools/ipa-dns-install
+++ b/install/tools/ipa-dns-install
@@ -108,7 +108,14 @@ def main():
else:
hostaddr = resolve_host(api.env.host)
ip_address = hostaddr and ipautil.CheckedIPAddress(hostaddr)
- if not ip_address or not verify_ip_address(ip_address):
+
+ try:
+ verify_ip_address(ip_address)
+ except Exception, e:
+ print "Error: Invalid IP Address %s: %s" % (ip_address, e)
+ ip_address = None
+
+ if not ip_address:
if options.unattended:
sys.exit("Unable to resolve IP address for host name")
else: