chiark / gitweb /
timesyncd: save clock to disk everytime we get an NTP fix, and bump clock at boot...
authorLennart Poettering <lennart@poettering.net>
Tue, 20 May 2014 15:04:11 +0000 (00:04 +0900)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 May 2014 15:23:39 +0000 (00:23 +0900)
commitece6e766cf89c8ec82ad135969dedf16cd7c1ee8
tree14b04f6d517356776e6d34d80087456f0f0a985a
parent83be2c398589a3d64db5999cfd5527c5219bff46
timesyncd: save clock to disk everytime we get an NTP fix, and bump clock at boot using this

This is useful to make sure the system clock stays monotonic even on
systems that lack an RTC.

Also, why we are at it, also use the systemd release time for bumping
the clock, since it's a slightly less bad than starting with jan 1st,
1970.

This also moves timesyncd into the early bootphase, in order to make
sure this initial bump is guaranteed to have finished by the time we
start real daemons which might write to the file systemd and thus
shouldn't leave 1970's timestamps all over the place...
src/timesync/timesyncd.c
units/systemd-timesyncd.service.in