Skip to content
This repository was archived by the owner on Nov 15, 2025. It is now read-only.

Commit 1431b2f

Browse files
authored
man: Advertise systemd-time-wait-sync.service more (systemd#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 systemd#5097, systemd#8861, systemd#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: NixOS/nixpkgs#51338 This patch adds a mention right in the description of time-sync.target, which will hopefully raise awareness of this helper service.
1 parent d1a61df commit 1431b2f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

man/systemd.special.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,16 @@
10181018
in. systemd automatically adds dependencies of type
10191019
<varname>After=</varname> for this target unit to all SysV
10201020
init script service units with an LSB header referring to
1021-
the <literal>$time</literal> facility. </para>
1021+
the <literal>$time</literal> facility, and also to all timer
1022+
units with at least one <varname>OnCalendar=</varname>
1023+
directive. </para>
1024+
1025+
<para>This target might get reached before the clock is actually synchronized to an accurate reference
1026+
clock. To prevent that, enable
1027+
<citerefentry><refentrytitle>systemd-time-wait-sync.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1028+
if you're using
1029+
<citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
1030+
or an equivalent service for other NTP implementations.</para>
10221031
</listitem>
10231032
</varlistentry>
10241033
</variablelist>

0 commit comments

Comments
 (0)