[systemd-devel] : How to modify systemd so that the NTP function is disabled when systemd is first started?

Michael Biebl mbiebl at gmail.com
Sat Apr 25 09:37:02 UTC 2020


Am Sa., 25. Apr. 2020 um 08:52 Uhr schrieb www <ouyangxuan10 at 163.com>:

> Apr 02 17:24:52 demoboard systemd[1]: System time before build time, advancing clock.

See https://github.com/systemd/systemd/blob/master/src/core/main.c#L1485
or more specifically
https://github.com/systemd/systemd/blob/master/src/shared/clock-util.c#L145

If you want to change time_epoch, use the meson "time_epoch" build option.
time_epoch is currently derived frome the date, when the NEWS file was
last modified.
But you could set that to say 1.1.1970.


> Apr 02 17:25:02 demoboard systemd[1]: logrotate.timer: Not using persistent file timestamp Sat 2020-04-25 13:45:26 CST as it is in the future.
> Apr 02 17:25:04 demoboard systemd[1]: Reached target Timers.
> Apr 02 17:25:38 demoboard systemd[1]: Starting Time & Date Service...
> Apr 02 17:25:40 demoboard systemd[1308]: systemd-timedated.service: ProtectHostname=yes is configured, but the kernel does not support UTS namespaces, ignoring namespace setup.
> Apr 02 17:25:42 demoboard systemd[1]: Started Time & Date Service.
> Apr 02 17:26:13 demoboard systemd[1]: systemd-timedated.service: Succeeded.
> Apr 02 17:27:03 demoboard systemd[1]: Starting Time & Date Service...
> Apr 02 17:27:03 demoboard systemd[1823]: systemd-timedated.service: ProtectHostname=yes is configured, but the kernel does not support UTS namespaces, ignoring namespace setup.
> Apr 02 17:27:03 demoboard systemd[1]: Started Time & Date Service.
>
> It can be seen from the log that after the TimeSync service is disabled, the latest time is obtained from NTP server, but it is not updated to the system. But the system time has also been modified.

systemd-timedated.service has nothing to do with NTP.


More information about the systemd-devel mailing list