From 3e98d8ddadcdede663d38853f68fd605e2457b96 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 6 Oct 2010 10:16:54 -0400 Subject: install-script: Do not ask to remove DNS data When we uninstall we wipe out the entire LDAP database, so it doesn't really make mush sense to try to also remove single entries from it. This avoids the --uninstall procedure to fail because the DM password is not available or the LDAP server is down, and we are just trying to cleanup everything. --- install/tools/ipa-server-install | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'install') diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 6378628ce..ebf71666e 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -378,9 +378,7 @@ def check_dirsrv(unattended): print "\t636" sys.exit(1) -def uninstall(dm_password=None): - if dm_password: - api.Backend.ldap2.connect(bind_dn="cn=Directory Manager", bind_pw=dm_password) +def uninstall(): try: (stdout, stderr, rc) = run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--uninstall"], raiseonerr=False) @@ -465,7 +463,6 @@ def main(): ) if options.uninstall: - dm_password = options.dm_password # We will need at least api.env, finalize api now. This system is # already installed, so the configuration file is there. @@ -478,21 +475,8 @@ def main(): print "" print "Aborting uninstall operation." sys.exit(1) - if not dm_password: - if user_input("Do you want to remove old SRV and NS records?", False): - dm_password = read_password("Directory Manager", confirm=False, validate=False) - # Try out the password - ldapuri = 'ldap://%s' % api.env.host - try: - conn = ldap2(shared_instance=False, ldap_uri=ldapuri) - conn.connect(bind_dn='cn=directory manager', bind_pw=dm_password) - except errors.ACIError: - sys.exit("\nThe password provided is incorrect for LDAP server %s" % api.env.host) - except errors.ExecutionError: - sys.exit("\nUnable to connect to LDAP server %s" % api.env.host) - conn.disconnect() - - return uninstall(dm_password) + + return uninstall() # This will override any settings passed in on the cmdline options._update_loose(read_cache()) -- cgit