diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-05-27 17:05:45 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-05-27 18:00:47 +0200 |
commit | 17c3f9e84efcbeb3b5ae1de83d799974de3bb078 (patch) | |
tree | c219902aa7d2a98c63ac7605e712c33f59166dc8 /install/tools/ipa-dns-install | |
parent | 58c1950566f9fb03b61461f40074e47614113194 (diff) | |
download | freeipa-17c3f9e84efcbeb3b5ae1de83d799974de3bb078.tar.gz freeipa-17c3f9e84efcbeb3b5ae1de83d799974de3bb078.tar.xz freeipa-17c3f9e84efcbeb3b5ae1de83d799974de3bb078.zip |
Fix reverse zone creation in ipa-replica-prepare
When a new reverse zone was created in ipa-replica-prepare (this
may happen when a new replica is from different subnet), the master
DNS address was corrupted by invalid A/AAAA record. This caused
problems for example in installing replica.
https://fedorahosted.org/freeipa/ticket/1223
Diffstat (limited to 'install/tools/ipa-dns-install')
-rwxr-xr-x | install/tools/ipa-dns-install | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install index aac85bf23..a76329767 100755 --- a/install/tools/ipa-dns-install +++ b/install/tools/ipa-dns-install @@ -62,31 +62,6 @@ def parse_options(): return safe_options, options -def resolve_host(host_name): - ip = None - try: - addrinfos = socket.getaddrinfo(host_name, None, - socket.AF_UNSPEC, socket.SOCK_DGRAM) - except: - print "Unable to lookup the IP address of the provided host" - return None - - for ai in addrinfos: - ip = ai[4][0] - if ip == "127.0.0.1" or ip == "::1": - print "The hostname resolves to the localhost address (127.0.0.1/::1)" - print "Please change your /etc/hosts file so that the hostname." - print "resolves to the ip address of your network interface." - print "" - print "Please fix your /etc/hosts file and restart the setup program." - print "" - sys.exit("Aborting installation.") - - if addrinfos: - ip = addrinfos[0][4][0] - - return ip - def main(): safe_options, options = parse_options() @@ -211,6 +186,13 @@ except KeyboardInterrupt: print "Installation cancelled." except RuntimeError, e: print str(e) +except HostnameLocalhost: + print "The hostname resolves to the localhost address (127.0.0.1/::1)" + print "Please change your /etc/hosts file so that the hostname" + print "resolves to the ip address of your network interface." + print "The KDC service does not listen on localhost" + print "" + print "Please fix your /etc/hosts file and restart the setup program" except Exception, e: message = "Unexpected error - see ipaserver-install.log for details:\n %s" % str(e) print message |