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/base.py | |
parent | 146da1b3269659cc92a444f85608820e044f8796 (diff) | |
download | freeipa.git-62e7053a12fdfc38ac7ed212529c716428c7d92b.tar.gz freeipa.git-62e7053a12fdfc38ac7ed212529c716428c7d92b.tar.xz freeipa.git-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/base.py')
-rw-r--r-- | ipapython/platform/base.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ipapython/platform/base.py b/ipapython/platform/base.py index 8385e103..41a9c83e 100644 --- a/ipapython/platform/base.py +++ b/ipapython/platform/base.py @@ -136,12 +136,15 @@ class PlatformService(object): def __init__(self, service_name): self.service_name = service_name - def start(self, instance_name="", capture_output=True, wait=True): + def start(self, instance_name="", capture_output=True, wait=True, + update_service_list=True): """ When a service is started record the fact in a special file. This allows ipactl stop to always stop all services that have been started via ipa tools """ + if not update_service_list: + return svc_list = [] try: f = open(SVC_LIST_FILE, 'r') @@ -159,10 +162,12 @@ class PlatformService(object): f.close() return - def stop(self, instance_name="", capture_output=True): + def stop(self, instance_name="", capture_output=True, update_service_list=True): """ When a service is stopped remove it from the service list file. """ + if not update_service_list: + return svc_list = [] try: f = open(SVC_LIST_FILE, 'r') |