Re-arrange CA configuration code to reduce the number of restarts.

Ade Lee from the dogtag team looked at the configuration code and
determined that a number of restarts were not needed and recommended
re-arranging other code to reduce the number of restarts to one.

https://fedorahosted.org/freeipa/ticket/1555
This commit is contained in:
Rob Crittenden
2011-08-01 15:16:24 -04:00
parent eb0454d45c
commit 8495af1a50
5 changed files with 19 additions and 45 deletions

View File

@@ -144,9 +144,6 @@ def main():
cs.add_simple_service('dogtagldap/%s@%s' % (config.host_name, config.realm_name))
cs.add_cert_to_service()
service.print_msg("Setting the certificate subject base")
CA.set_subject_in_config(util.realm_to_suffix(config.realm_name))
try:
if not os.geteuid()==0:
sys.exit("\nYou must be root to run this script.\n")

View File

@@ -433,9 +433,6 @@ def main():
CA.import_ra_cert(dir + "/ra.p12")
CA.fix_ra_perms()
service.restart("httpd")
if config.setup_ca:
service.print_msg("Setting the certificate subject base")
CA.set_subject_in_config(util.realm_to_suffix(config.realm_name))
# The DS instance is created before the keytab, add the SSL cert we
# generated

View File

@@ -900,9 +900,6 @@ def main():
ipautil.run(["/sbin/restorecon", "/var/cache/ipa/sessions"])
set_subject_in_config(realm_name, dm_password, util.realm_to_suffix(realm_name), options.subject)
if not options.selfsign:
service.print_msg("Setting the certificate subject base")
ca.set_subject_in_config(util.realm_to_suffix(realm_name))
# Apply any LDAP updates. Needs to be done after the configuration file
# is created