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 <mbasti@redhat.com>
This commit is contained in:
David Kupka 2015-05-12 16:47:29 +02:00 committed by Jan Cholasta
parent 96f6d6ca09
commit 0167919ba8
2 changed files with 2 additions and 15 deletions

View File

@ -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)

View File

@ -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)