From 2efc08a6fc8c0407ff2169e3ef7eed92eaaa6545 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sat, 4 Dec 2010 15:42:14 -0500 Subject: Introduce ipa control script that reads configuration off ldap This replace the former ipactl script, as well as replace the current way ipa components are started. Instead of enabling each service in the system init scripts, enable only the ipa script, and then let it start all components based on the configuration read from the LDAP tree. resolves: https://fedorahosted.org/freeipa/ticket/294 --- ipaserver/install/cainstance.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'ipaserver/install/cainstance.py') diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 5f13b721f..4a645bc84 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -242,7 +242,6 @@ class CADSInstance(service.Service): self.step("creating directory server user", self.__create_ds_user) self.step("creating directory server instance", self.__create_instance) - self.step("configuring directory to start on boot", self.__enable) self.step("restarting directory server", self.__restart_instance) self.start_creation("Configuring directory server for the CA", 30) @@ -255,13 +254,6 @@ class CADSInstance(service.Service): SERVER_ROOT=server_root, DOMAIN=self.domain, TIME=int(time.time()), DSPORT=self.ds_port) - def __enable(self): - name = self.service_name - self.service_name="dirsrv" - self.backup_state("enabled", self.is_enabled()) - self.chkconfig_on() - self.service_name = name - def __create_ds_user(self): user_exists = True try: @@ -483,7 +475,11 @@ class CAInstance(service.Service): def __enable(self): self.backup_state("enabled", self.is_enabled()) - self.chkconfig_on() + # 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 + suffix = util.realm_to_suffix(self.realm) + self.ldap_enable('CA', self.fqdn, self.dm_password, suffix) def __create_ca_user(self): user_exists = True -- cgit