[systemd-devel] date/time set to epoch when using readonly rootfs
Lennart Poettering
lennart at poettering.net
Thu Oct 22 10:57:04 UTC 2020
On Do, 22.10.20 11:53, Belisko Marek (marek.belisko at gmail.com) wrote:
> > Hmm? this service has nothing to do with epoch/clock setting. It's
> > used for systems that have a "reboot-for-update" mode.
>
> Sorry I mixed up things. Can you pls guide where can I find code which
> set date/time from timestamp? Thanks
This is the stuff PID 1 calls during earliest boot:
https://github.com/systemd/systemd/blob/master/src/shared/clock-util.c#L147
(But note that the support for checking /usr/lib/clock-epoch is a
recent addition so far only available in git master.)
This is the stuff systemd-timesyncd does when initializing:
https://github.com/systemd/systemd/blob/master/src/timesync/timesyncd.c#L27
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list