From 0167919ba88ef718e7b678380ebfe3ddb4566831 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Tue, 12 May 2015 16:47:29 +0200 Subject: [PATCH] Do not store state if CA is enabled IPA creates own instance of CA, so there is no need to check if previous instance was enabled, because there could not be any. Reviewed-By: Martin Basti --- ipaserver/install/cainstance.py | 9 ++------- ipaserver/install/dogtaginstance.py | 8 -------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 7ba992bef..513394068 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -464,8 +464,6 @@ class CAInstance(DogtagInstance): self.step("enabling Subject Alternative Name", self.enable_subject_alternative_name) self.step("enabling CRL and OCSP extensions for certificates", self.__set_crl_ocsp_extensions) self.step("setting audit signing renewal to 2 years", self.set_audit_renewal) - self.step("configuring certificate server to start on boot", - self.enable) if not self.clone: self.step("restarting certificate server", self.restart_instance) self.step("requesting RA certificate from CA", self.__request_ra_certificate) @@ -1271,11 +1269,8 @@ class CAInstance(DogtagInstance): print "Updating subject_base in CA template failed" def uninstall(self): - enabled = self.restore_state("enabled") - - # disabled by default, by ldap_enable() - if enabled: - self.enable() + # just eat state + self.restore_state("enabled") if self.dogtag_constants.DOGTAG_VERSION >= 10: DogtagInstance.uninstall(self) diff --git a/ipaserver/install/dogtaginstance.py b/ipaserver/install/dogtaginstance.py index 98929b864..33f39f793 100644 --- a/ipaserver/install/dogtaginstance.py +++ b/ipaserver/install/dogtaginstance.py @@ -178,14 +178,6 @@ class DogtagInstance(service.Service): except ipautil.CalledProcessError, e: self.handle_setup_error(e) - def enable(self): - self.backup_state("enabled", self.is_enabled()) - # We do not let the system start IPA components on its own, - # Instead we reply on the IPA init script to start only enabled - # components as found in our LDAP configuration tree - # We need to install DS before we can actually ldap_enable a service. - # so actual enablement is delayed. - def restart_instance(self): try: self.restart(self.dogtag_constants.PKI_INSTANCE_NAME)