summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/odsexporterinstance.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/odsexporterinstance.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/odsexporterinstance.py')
-rw-r--r--ipaserver/install/odsexporterinstance.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/ipaserver/install/odsexporterinstance.py b/ipaserver/install/odsexporterinstance.py
index 57b1451c0..e01550446 100644
--- a/ipaserver/install/odsexporterinstance.py
+++ b/ipaserver/install/odsexporterinstance.py
@@ -82,7 +82,6 @@ class ODSExporterInstance(service.Service):
self.suffix)
except errors.DuplicateEntry:
root_logger.error("DNSKeyExporter service already exists")
- self.enable()
def __setup_key_exporter(self):
installutils.set_directive(paths.SYSOCNFIG_IPA_ODS_EXPORTER,
@@ -155,14 +154,13 @@ class ODSExporterInstance(service.Service):
self.print_msg("Unconfiguring %s" % self.service_name)
- running = self.restore_state("running")
- enabled = self.restore_state("enabled")
+ # just eat states
+ self.restore_state("running")
+ self.restore_state("enabled")
- if enabled is not None and not enabled:
- self.disable()
-
- if running is not None and running:
- self.start()
+ # stop and disable service (IPA service, we do not need it anymore)
+ self.disable()
+ self.stop()
# restore state of dnssec default signer daemon
signerd_enabled = self.restore_state("singerd_enabled")