summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-server-install
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-05-27 17:05:45 +0200
committerMartin Kosek <mkosek@redhat.com>2011-05-27 18:00:47 +0200
commit17c3f9e84efcbeb3b5ae1de83d799974de3bb078 (patch)
treec219902aa7d2a98c63ac7605e712c33f59166dc8 /install/tools/ipa-server-install
parent58c1950566f9fb03b61461f40074e47614113194 (diff)
downloadfreeipa-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-server-install')
-rwxr-xr-xinstall/tools/ipa-server-install29
1 files changed, 7 insertions, 22 deletions
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 00b133464..3ad623e61 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -28,7 +28,6 @@
import sys
import os
-import socket
import errno
import logging
import grp
@@ -303,27 +302,6 @@ def read_host_name(host_default,no_host_dns=False):
break
return host_name
-def resolve_host(host_name):
- ip = None
- try:
- addrinfos = socket.getaddrinfo(host_name, None,
- socket.AF_UNSPEC, socket.SOCK_DGRAM)
- 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 "The KDC service does not listen on localhost"
- print ""
- print "Please fix your /etc/hosts file and restart the setup program"
- return None
-
- ip = addrinfos[0][4][0]
- except:
- print "Unable to lookup the IP address of the provided host"
- return ip
-
def read_domain_name(domain_name, unattended):
print "The domain name has been calculated based on the host name."
print ""
@@ -987,6 +965,13 @@ try:
sys.exit(main())
except SystemExit, e:
sys.exit(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:
if uninstalling:
message = "Unexpected error - see ipaserver-uninstall.log for details:\n %s" % str(e)