summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver/ntpinstance.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server/ipaserver/ntpinstance.py')
-rw-r--r--ipa-server/ipaserver/ntpinstance.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/ipa-server/ipaserver/ntpinstance.py b/ipa-server/ipaserver/ntpinstance.py
index 3872d93c6..b321ec075 100644
--- a/ipa-server/ipaserver/ntpinstance.py
+++ b/ipa-server/ipaserver/ntpinstance.py
@@ -25,11 +25,8 @@ from ipa import ipautil
class NTPInstance(service.Service):
def __init__(self):
service.Service.__init__(self, "ntpd")
-
- def create_instance(self):
- self.start_creation(3, "Configuring ntpd")
- self.step("writing configuration")
+ def __write_config(self):
# The template sets the config to point towards ntp.pool.org, but
# they request that software not point towards the default pool.
# We use the OS variable to point it towards either the rhel
@@ -54,11 +51,13 @@ class NTPInstance(service.Service):
fd.write(ntp_conf)
fd.close()
+ def create_instance(self):
+ self.step("writing configuration", self.__write_config)
+
# we might consider setting the date manually using ntpd -qg in case
# the current time is very far off.
- self.step("starting ntpd")
- self.start()
-
- self.step("configuring ntpd to start on boot")
- self.chkconfig_on()
+ self.step("starting ntpd", self.start)
+ self.step("configuring ntpd to start on boot", self.chkconfig_on)
+
+ self.start_creation("Configuring ntpd")