summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/bindinstance.py
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-01-27 11:04:03 +0100
committerMartin Kosek <mkosek@redhat.com>2015-02-18 10:05:45 +0100
commitc3edfa2d8cee8f318837fb31680b495035a8bd2d (patch)
tree28288d817156bd4a27af122e1803b7a49c274e1d /ipaserver/install/bindinstance.py
parent76d401bb882283b039de2ceee8300d0c838db473 (diff)
downloadfreeipa-c3edfa2d8cee8f318837fb31680b495035a8bd2d.tar.gz
freeipa-c3edfa2d8cee8f318837fb31680b495035a8bd2d.tar.xz
freeipa-c3edfa2d8cee8f318837fb31680b495035a8bd2d.zip
Fix restoring services status during uninstall
Services hasn't been restored correctly, which causes disabling already disabled services, or some service did not start. This patch fix these issues. Ticket: https://fedorahosted.org/freeipa/ticket/4869 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/install/bindinstance.py')
-rw-r--r--ipaserver/install/bindinstance.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py
index 4e630e8dd..cd1c7e7a6 100644
--- a/ipaserver/install/bindinstance.py
+++ b/ipaserver/install/bindinstance.py
@@ -1179,8 +1179,6 @@ class BindInstance(service.Service):
self.dns_backup.clear_records(api.Backend.ldap2.isconnected())
- if not running is None:
- self.stop()
for f in [NAMED_CONF, RESOLV_CONF]:
try:
@@ -1189,11 +1187,12 @@ class BindInstance(service.Service):
root_logger.debug(error)
pass
- if not enabled is None and not enabled:
- self.disable()
+ # disabled by default, by ldap_enable()
+ if enabled:
+ self.enable()
- if not running is None and running:
- self.start()
+ if running:
+ self.restart()
self.named_regular.unmask()
if named_regular_enabled: