Skip to content

Commit

Permalink
Add parameter rtcsync.
Browse files Browse the repository at this point in the history
To avoid having it hardcoded by the template.
  • Loading branch information
chrekh committed Jul 10, 2020
1 parent 3c5ae40 commit ec59d0a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,14 @@ See [clientloglimit](https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html#clien

Default value: `undef`

##### `rtcsync`

Data type: Boolean

Periodically sync syste time to RTC

Default value: `true'

##### `rtconutc`

Data type: Boolean
Expand Down
3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@
# When set, specifies the maximum amount of memory in bytes that chronyd is allowed to allocate for logging of client accesses.
# If not set, chrony's, default will be used. In modern versions this is 524288 bytes. Older versions defaulted to have no limit.
# See [clientloglimit](https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html#clientloglimit)
# @param rtcsync
# Sync system clock to RTC periodically
# @param rtconutc
# Keep RTC in UTC instead of local time.
# If not set, chrony's, default will be used. On Arch Linux the default is true instead.
Expand Down Expand Up @@ -224,6 +226,7 @@
Optional[String] $leapsectz = undef,
Optional[Float] $maxslewrate = undef,
Optional[Numeric] $stratumweight = undef,
Boolean $rtcsync = true,
Boolean $rtconutc = $chrony::params::rtconutc,
Variant[Hash,Array[String]] $hwtimestamps = [],
) inherits chrony::params {
Expand Down
2 changes: 2 additions & 0 deletions templates/chrony.conf.epp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ stratumweight <%= $chrony::stratumweight %>

# Record the rate at which the system clock gains/losses time.
driftfile <%= $chrony::driftfile %>
<% if $chrony::rtcsync { -%>

# Enable kernel RTC synchronization.
rtcsync
<% } -%>
<% if $chrony::makestep_seconds and $chrony::makestep_updates { -%>

# In first <%= $chrony::makestep_updates %> updates step the system clock instead of slew
Expand Down

0 comments on commit ec59d0a

Please sign in to comment.