diff options
author | Simo Sorce <simo@redhat.com> | 2012-11-01 14:23:38 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-11-01 14:23:38 -0400 |
commit | 895b2e2b4339f1b9edc2bc995e7548ac118ea5a1 (patch) | |
tree | 2e40a8561b27361cd32975352b790e745286bcbe | |
parent | 1c7261773b5190ec17c7d161a83e00a979c54076 (diff) | |
download | freeipa-895b2e2b4339f1b9edc2bc995e7548ac118ea5a1.tar.gz freeipa-895b2e2b4339f1b9edc2bc995e7548ac118ea5a1.tar.xz freeipa-895b2e2b4339f1b9edc2bc995e7548ac118ea5a1.zip |
Revert "Save service name on service startup"
This reverts commit 1ef651e7f9f5f940051dc470385aa08eefcd60af.
This was an olde version of the patch, next commit will put in the acked
version.
-rw-r--r-- | ipapython/platform/base.py | 23 | ||||
-rw-r--r-- | ipapython/platform/redhat.py | 1 | ||||
-rw-r--r-- | ipapython/platform/systemd.py | 1 | ||||
-rw-r--r-- | ipapython/services.py.in | 4 |
4 files changed, 0 insertions, 29 deletions
diff --git a/ipapython/platform/base.py b/ipapython/platform/base.py index 1101b5cdc..2d39d2169 100644 --- a/ipapython/platform/base.py +++ b/ipapython/platform/base.py @@ -17,8 +17,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. from ipalib.plugable import MagicDict -import json -import os # Canonical names of services as IPA wants to see them. As we need to have # *some* naming, set them as in Red Hat distributions. Actual implementation @@ -42,8 +40,6 @@ wellknownports = { 'pki-tomcatd': [8080, 8443], # used if the incoming instance name is blank } -SVC_LIST_FILE = "/var/run/ipa/services.list" - class AuthConfig(object): """ AuthConfig class implements system-independent interface to configure @@ -137,25 +133,6 @@ class PlatformService(object): self.service_name = service_name def start(self, instance_name="", capture_output=True, wait=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 - """ - svc_list = [] - try: - f = open(SVC_LIST_FILE, 'r') - svc_list = json.load(f) - except Exception: - # not fatal, may be the first service - pass - - svc_list.append(self.service_name) - - f = open(SVC_LIST_FILE, 'w') - json.dump(svc_list, f) - f.flush() - f.close() return def stop(self, instance_name="", capture_output=True): diff --git a/ipapython/platform/redhat.py b/ipapython/platform/redhat.py index cd1277733..3551c2841 100644 --- a/ipapython/platform/redhat.py +++ b/ipapython/platform/redhat.py @@ -71,7 +71,6 @@ class RedHatService(base.PlatformService): ipautil.run(["/sbin/service", self.service_name, "start", instance_name], capture_output=capture_output) if wait and self.is_running(instance_name): self.__wait_for_open_ports(instance_name) - super(RedHatService, self).start(instance_name) def restart(self, instance_name="", capture_output=True, wait=True): ipautil.run(["/sbin/service", self.service_name, "restart", instance_name], capture_output=capture_output) diff --git a/ipapython/platform/systemd.py b/ipapython/platform/systemd.py index 634140583..6c25a79b6 100644 --- a/ipapython/platform/systemd.py +++ b/ipapython/platform/systemd.py @@ -96,7 +96,6 @@ class SystemdService(base.PlatformService): ipautil.run(["/bin/systemctl", "start", self.service_instance(instance_name)], capture_output=capture_output) if wait and self.is_running(instance_name): self.__wait_for_open_ports(self.service_instance(instance_name)) - super(SystemdService, self).start(instance_name) def restart(self, instance_name="", capture_output=True, wait=True): # Restart command is broken before systemd-36-3.fc16 diff --git a/ipapython/services.py.in b/ipapython/services.py.in index 16b62ca85..8fe663763 100644 --- a/ipapython/services.py.in +++ b/ipapython/services.py.in @@ -51,8 +51,4 @@ backup_and_replace_hostname = backup_and_replace_hostname_default def check_selinux_status(): return -from ipapython.platform.base import SVC_LIST_FILE -def get_svc_list_file(): - return SVC_LIST_FILE - from ipapython.platform.SUPPORTED_PLATFORM import * |