diff options
author | Tomas Babej <tbabej@redhat.com> | 2014-05-29 10:18:21 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-06-16 19:48:19 +0200 |
commit | 926f8647d2a676c1dd2e446633eb76cdf1a7bf0c (patch) | |
tree | 06c6519941bba3814a4e41d72580db8fd2814421 /ipa-client/ipaclient | |
parent | a7c2327a366d2dfbbdde5362e957fad23e233105 (diff) | |
download | freeipa-926f8647d2a676c1dd2e446633eb76cdf1a7bf0c.tar.gz freeipa-926f8647d2a676c1dd2e446633eb76cdf1a7bf0c.tar.xz freeipa-926f8647d2a676c1dd2e446633eb76cdf1a7bf0c.zip |
ipaplatform: Change platform dependant code in freeipa to use ipaplatform tasks
https://fedorahosted.org/freeipa/ticket/4052
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipa-client/ipaclient')
-rw-r--r-- | ipa-client/ipaclient/ntpconf.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ipa-client/ipaclient/ntpconf.py b/ipa-client/ipaclient/ntpconf.py index 11d37091e..9a68016e5 100644 --- a/ipa-client/ipaclient/ntpconf.py +++ b/ipa-client/ipaclient/ntpconf.py @@ -21,6 +21,7 @@ from ipapython import ipautil from ipapython import services as ipaservices import shutil import os +from ipaplatform import tasks ntp_conf = """# Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. @@ -110,7 +111,7 @@ def config_ntp(server_fqdn, fstore = None, sysstore = None): ns = ipautil.template_str(ntp_step_tickers, sub_dict) __backup_config(path_step_tickers, fstore) __write_config(path_step_tickers, ns) - ipaservices.restore_context(path_step_tickers) + tasks.restore_context(path_step_tickers) if sysstore: module = 'ntp' @@ -120,11 +121,11 @@ def config_ntp(server_fqdn, fstore = None, sysstore = None): __backup_config(path_ntp_conf, fstore) __write_config(path_ntp_conf, nc) - ipaservices.restore_context(path_ntp_conf) + tasks.restore_context(path_ntp_conf) __backup_config(path_ntp_sysconfig, fstore) __write_config(path_ntp_sysconfig, ntp_sysconfig) - ipaservices.restore_context(path_ntp_sysconfig) + tasks.restore_context(path_ntp_sysconfig) # Set the ntpd to start on boot ipaservices.knownservices.ntpd.enable() |