diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-12-04 13:55:30 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2012-12-05 10:44:44 -0500 |
commit | 62e7053a12fdfc38ac7ed212529c716428c7d92b (patch) | |
tree | 0ebed19d971804583bc567c31b6fc655259f19df /ipapython/platform/systemd.py | |
parent | 146da1b3269659cc92a444f85608820e044f8796 (diff) | |
download | freeipa-62e7053a12fdfc38ac7ed212529c716428c7d92b.tar.gz freeipa-62e7053a12fdfc38ac7ed212529c716428c7d92b.tar.xz freeipa-62e7053a12fdfc38ac7ed212529c716428c7d92b.zip |
Only update the list of running services in the installer or ipactl.
The file is only present in the case of a server installation.
It should only be touched by the server installer and ipactl.
https://fedorahosted.org/freeipa/ticket/3277
Diffstat (limited to 'ipapython/platform/systemd.py')
-rw-r--r-- | ipapython/platform/systemd.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ipapython/platform/systemd.py b/ipapython/platform/systemd.py index bb6c00929..4e8a03f2f 100644 --- a/ipapython/platform/systemd.py +++ b/ipapython/platform/systemd.py @@ -91,13 +91,21 @@ class SystemdService(base.PlatformService): def stop(self, instance_name="", capture_output=True): ipautil.run(["/bin/systemctl", "stop", self.service_instance(instance_name)], capture_output=capture_output) - super(SystemdService, self).stop(instance_name) + if 'context' in api.env and api.env.context in ['ipactl', 'installer']: + update_service_list = True + else: + update_service_list = False + super(SystemdService, self).stop(instance_name,update_service_list=update_service_list) def start(self, instance_name="", capture_output=True, wait=True): ipautil.run(["/bin/systemctl", "start", self.service_instance(instance_name)], capture_output=capture_output) + if 'context' in api.env and api.env.context in ['ipactl', 'installer']: + update_service_list = True + else: + update_service_list = False if wait and self.is_running(instance_name): self.__wait_for_open_ports(self.service_instance(instance_name)) - super(SystemdService, self).start(instance_name) + super(SystemdService, self).start(instance_name, update_service_list=update_service_list) def restart(self, instance_name="", capture_output=True, wait=True): # Restart command is broken before systemd-36-3.fc16 |