From 71a032db19fcebfeb5f258f6855987749e3a4e21 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 29 Sep 2010 14:51:35 -0400 Subject: Detect if DNS is already configured in IPA, or if IPA is not yet installed. ipa-dns-manage could fail in very odd ways depending on the current configuration of the server. Handle things a bit better. ticket 210 --- install/tools/ipa-dns-install | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'install') diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install index 8fc503e4e..ece77ec7c 100755 --- a/install/tools/ipa-dns-install +++ b/install/tools/ipa-dns-install @@ -110,6 +110,9 @@ def main(): api.bootstrap(**cfg) api.finalize() + if bindinstance.dns_container_exists(api.env.host, api.env.realm): + sys.exit("\nDNS is already configured in this IPA server.") + # Check we have a public IP that is associated with the hostname if options.ip_address: ip_address = options.ip_address @@ -176,6 +179,8 @@ except SystemExit, e: sys.exit(e) except KeyboardInterrupt: print "Installation cancelled." +except RuntimeError, e: + print str(e) except Exception, e: message = "Unexpected error - see ipaserver-install.log for details:\n %s" % str(e) print message -- cgit