summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipaclient
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2011-09-13 00:11:24 +0300
committerMartin Kosek <mkosek@redhat.com>2011-09-13 11:15:31 +0200
commit45e379d5bf94170ccce16e6e2af8c5ccc55c826b (patch)
tree9a82f06c32a7af3cda82e41ea8ab0118a7100fab /ipa-client/ipaclient
parenta02e0514f60f8ce5716876717b77e8712cc38396 (diff)
downloadfreeipa-45e379d5bf94170ccce16e6e2af8c5ccc55c826b.tar.gz
freeipa-45e379d5bf94170ccce16e6e2af8c5ccc55c826b.tar.xz
freeipa-45e379d5bf94170ccce16e6e2af8c5ccc55c826b.zip
Convert client-side tools to platform-independent access to system services
https://fedorahosted.org/freeipa/ticket/1605
Diffstat (limited to 'ipa-client/ipaclient')
-rw-r--r--ipa-client/ipaclient/ntpconf.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ipa-client/ipaclient/ntpconf.py b/ipa-client/ipaclient/ntpconf.py
index 6054e5e59..3042005f4 100644
--- a/ipa-client/ipaclient/ntpconf.py
+++ b/ipa-client/ipaclient/ntpconf.py
@@ -18,6 +18,7 @@
#
from ipapython import ipautil
+from ipapython import services as ipaservices
import shutil
ntp_conf = """# Permit time synchronization with our time source, but do not
@@ -105,7 +106,7 @@ def config_ntp(server_fqdn, fstore = None):
fd.close()
# Set the ntpd to start on boot
- ipautil.run(["/sbin/chkconfig", "ntpd", "on"])
+ ipaservices.knownservices.ntpd.enable()
# Restart ntpd
- ipautil.run(["/sbin/service", "ntpd", "restart"])
+ ipaservices.knownservices.ntpd.restart()