Fix saving named restore status

Accidentaly status was stored after service was stopped by installer

Ticket: https://fedorahosted.org/freeipa/ticket/4869
Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Martin Basti authored and Martin Kosek committed 2015-02-18 10:05:45 +01:00
1 parent b5e06b90c9
commit d216cab619
1 file changed
+4 -2
+4 -2
View File
@@ -659,8 +659,6 @@ class BindInstance(service.Service):
if self.get_state("running") is None:
# first time store status
self.backup_state("running", self.is_running())
self.backup_state("named-regular-running",
self.named_regular.is_running())
self.restart()
except Exception as e:
root_logger.error("Named service failed to start (%s)", e)
@@ -682,6 +680,10 @@ class BindInstance(service.Service):
root_logger.error("DNS service already exists")
# disable named, we need to run named-pkcs11 only
if self.get_state("named-regular-running") is None:
# first time store status
self.backup_state("named-regular-running",
self.named_regular.is_running())
try:
self.named_regular.stop()
except Exception as e: