Skip to content

Commit

Permalink
Switch to rtcsync for chrony
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mgariepy committed Jan 15, 2019
1 parent ebb0f3e commit ef1b417
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions templates/chrony.conf.j2
Expand Up @@ -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
Expand Down

0 comments on commit ef1b417

Please sign in to comment.