From: Alexander Batischev Date: Sat, 19 Dec 2020 11:17:49 +0000 (+0300) Subject: man: Advertise systemd-time-wait-sync.service more (#17729) X-Git-Tag: v248-rc1~465 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1431b2f701f7ba71e5d8664e709b1fad26797918;p=thirdparty%2Fsystemd.git man: Advertise systemd-time-wait-sync.service more (#17729) * man: Advertise systemd-time-wait-sync.service more The description of time-sync.target says that NTP services *should* pull that target, but doesn't mention that e.g. systemd-timesyncd.service doesn't actually do that. As a result, time-sync.target is reached way earlier than people expect; see #5097, #8861, #11008. systemd provides systemd-time-wait-sync.service to ameliorate this problem, but doesn't feature it prominently in relevant manpages. In fact, it's only mentioned in passing in systemd-timesyncd.service(8). As a result, I ended up re-implementing that service, and I'm not the first one: https://github.com/NixOS/nixpkgs/pull/51338 This patch adds a mention right in the description of time-sync.target, which will hopefully raise awareness of this helper service. --- diff --git a/man/systemd.special.xml b/man/systemd.special.xml index a70e9ee0cae..1977157f9e9 100644 --- a/man/systemd.special.xml +++ b/man/systemd.special.xml @@ -1018,7 +1018,16 @@ in. systemd automatically adds dependencies of type After= for this target unit to all SysV init script service units with an LSB header referring to - the $time facility. + the $time facility, and also to all timer + units with at least one OnCalendar= + directive. + + This target might get reached before the clock is actually synchronized to an accurate reference + clock. To prevent that, enable + systemd-time-wait-sync.service8 + if you're using + systemd-timesyncd.service8, + or an equivalent service for other NTP implementations.