From a02e0514f60f8ce5716876717b77e8712cc38396 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 13 Sep 2011 10:47:13 +0300 Subject: Convert server install code to platform-independent access to system services https://fedorahosted.org/freeipa/ticket/1605 --- ipaserver/install/ntpinstance.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ipaserver/install/ntpinstance.py') diff --git a/ipaserver/install/ntpinstance.py b/ipaserver/install/ntpinstance.py index d85e430b..00217c39 100644 --- a/ipaserver/install/ntpinstance.py +++ b/ipaserver/install/ntpinstance.py @@ -23,6 +23,7 @@ import logging import service from ipapython import sysrestore from ipapython import ipautil +from ipapython import services as ipaservices class NTPInstance(service.Service): def __init__(self, fstore=None): @@ -143,7 +144,7 @@ class NTPInstance(service.Service): def __enable(self): self.backup_state("enabled", self.is_enabled()) - self.chkconfig_on() + self.enable() def create_instance(self): @@ -168,13 +169,13 @@ class NTPInstance(service.Service): self.stop() try: - self.fstore.restore_file("/etc/ntp.conf") + self.fstore.restore_file("/etc/ntp.conf") except ValueError, error: logging.debug(error) pass if not enabled is None and not enabled: - self.chkconfig_off() + self.disable() if not running is None and running: self.start() -- cgit