From ef1b4170328391d55c3ca94e8183fdd56a229c34 Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Tue, 15 Jan 2019 09:35:09 -0500 Subject: [PATCH] Switch to rtcsync for chrony when setting security_ntp_sync_rtc to true, chrony will sync rtc every 11 minutes. using rtcfile + rtcautotrim locks access to rtc clock for other tools, like hwclock or timedatectl so it's hard to validate that the clock is really synced. Change-Id: I72fd18d36ab139d7140281374b5c2b89f7cb460a --- templates/chrony.conf.j2 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/templates/chrony.conf.j2 b/templates/chrony.conf.j2 index bf91e6c7..3c9b79a1 100644 --- a/templates/chrony.conf.j2 +++ b/templates/chrony.conf.j2 @@ -83,14 +83,12 @@ makestep 1 3 # mailonchange root@localhost 0.5 {% if security_ntp_sync_rtc | bool %} -# This directive tells chrony to regulate the real-time clock and tells it -# Where to store related data. It may not work on some newer motherboards -# that use the HPET real-time clock. It requires enhanced real-time -# support in the kernel. It is disabled by default because with certain -# combinations of motherboard and kernel it is reported to cause lockups. - -rtcfile /var/lib/chrony/chrony.rtc -rtcautotrim 10 +# The rtcsync directive enables a mode where the system time is periodically +# copied to the real time clock (RTC). +# On Linux the RTC copy is performed by the kernel every 11 minutes. This +# directive cannot be used when the normal RTC tracking is enabled, i.e. when +# the rtcfile directive is used. +rtcsync {% endif %} # If the last line of this file reads 'rtconutc' chrony will assume that