From d216cab6192398f85e2bcc4916826bc91c2841de Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Mon, 9 Feb 2015 17:28:45 +0100 Subject: [PATCH] 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 --- ipaserver/install/bindinstance.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index cd1c7e7a6..d48766673 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -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: