diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-05-13 16:29:01 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-05-14 09:57:33 -0400 |
commit | 272ada7cedd7ffad2390fe480d0e8d54aff65073 (patch) | |
tree | e61c6fafd175847656caead3bca757d07830c9b4 | |
parent | 07603b45e7812db7cda6d328f362d96856b394e5 (diff) | |
download | freeipa-272ada7cedd7ffad2390fe480d0e8d54aff65073.tar.gz freeipa-272ada7cedd7ffad2390fe480d0e8d54aff65073.tar.xz freeipa-272ada7cedd7ffad2390fe480d0e8d54aff65073.zip |
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
-rw-r--r-- | ipa-client/ipa-install/ipa-client-install | 5 | ||||
-rw-r--r-- | ipa-server/ipaserver/krbinstance.py | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index bb180fc6..5355d568 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 79dbf49a..50250f63 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: |