From 272ada7cedd7ffad2390fe480d0e8d54aff65073 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 13 May 2008 16:29:01 -0400 Subject: Make sure all services are stopped during uninstall. We were just shutting down the KDC if it had been started prior to IPA installation. We need to stop it in all cases. And we should restart nscd as it may have made an LDAP connection. 440322 --- ipa-client/ipa-install/ipa-client-install | 5 +++++ ipa-server/ipaserver/krbinstance.py | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index bb180fc6d..5355d5685 100644 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -91,6 +91,11 @@ def uninstall(options): print "Failed to remove krb5/ldap configuration. " +str(e) sys.exit(1) + try: + run(["/sbin/service", "nscd", "restart"]) + except: + print "Failed to restart start the NSCD daemon" + if not options.unattended: print "The original nsswitch.conf configuration has been restored." print "You may need to restart services or reboot the machine." diff --git a/ipa-server/ipaserver/krbinstance.py b/ipa-server/ipaserver/krbinstance.py index 79dbf49a5..50250f638 100644 --- a/ipa-server/ipaserver/krbinstance.py +++ b/ipa-server/ipaserver/krbinstance.py @@ -394,8 +394,10 @@ class KrbInstance(service.Service): running = self.restore_state("running") enabled = self.restore_state("enabled") - if not running is None: + try: self.stop() + except: + pass for f in ["/var/kerberos/krb5kdc/ldappwd", "/var/kerberos/krb5kdc/kdc.conf", "/etc/krb5.conf"]: try: -- cgit