Re: systemd, ntp, kernel and hwclock
Ben Hutchings <ben@decadent.org.uk> writes:
> On Mon, 2017-02-27 at 11:18 -0800, Russ Allbery wrote:
>> The much simpler systemd-timesyncd doesn't set the hardware clock for
>> reasons that one may or may not agree with (I honestly haven't
>> researched it in any depth),
> It looks like it does iff the RTC is set to UTC:
> /*
> * An unset STA_UNSYNC will enable the kernel's 11-minute mode,
> * which syncs the system time periodically to the RTC.
> *
> * In case the RTC runs in local time, never touch the RTC,
> * we have no way to properly handle daylight saving changes and
> * mobile devices moving between time zones.
> */
> if (m->rtc_local_time)
> tmx.status |= STA_UNSYNC;
Oh! Okay, then yes, it shouldn't matter whether it persists at shutdown
or not, since it will be setting it periodically anyway.
>> but you can just run ntpd instead if you care.
> But ntpd is also known to have a large amount of code written without
> as much regard for security as one would hope. It seems like an
> unnecessary risk for most systems.
Indeed, I've personally switched to systemd-timesyncd on my systems, which
works fine for me. (I think there are other lightweight clients if people
want something different.)
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: