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
This commit is contained in:
Marc Gariepy 2019-01-15 09:35:09 -05:00
parent ebb0f3ed83
commit ef1b417032
1 changed files with 6 additions and 8 deletions

View File

@ -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