Skip to content

Commit

Permalink
man: extend documentation for timedatectl's set-ntp command
Browse files Browse the repository at this point in the history
This extends on the relationship between timedatectl's set-ntp command
and its effect on the systemd-timesyncd.service unit. This also links
that unit back to the timedatectl man page.

Closes systemd#798.
  • Loading branch information
poettering committed Aug 16, 2015
1 parent e6a26d8 commit 8731be1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
4 changes: 4 additions & 0 deletions man/systemd-timesyncd.service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
files, and the per-link dynamic settings received over DHCP. See
<citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more details.</para>

<para><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
<command>set-ntp</command> command may be used to enable and
start, or disable and stop this service.</para>
</refsect1>

<refsect1>
Expand Down
27 changes: 21 additions & 6 deletions man/timedatectl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,27 @@
<term><command>set-ntp [BOOL]</command></term>

<listitem><para>Takes a boolean argument. Controls whether
network time synchronization is enabled (if available). This
enables or disables the
<filename>systemd-timesyncd.service</filename> unit. Note that
even if this command turns time synchronization off a
different system service might still synchronize the clock
with the network.</para></listitem>
network time synchronization is active and enabled (if
available). This enables and starts, or disables and stops the
<filename>systemd-timesyncd.service</filename> unit. It does
not affect the state of any other, unrelated network time
synchronization services that might be installed on the
system. This command is hence mostly equivalent to:
<command>systemctl enable --now
systemd-timesyncd.service</command> and <command>systemctl
disable --now systemd-timesyncd.service</command>, but is
protected by a different access policy.</para>

<para>Note that even if time synchronization is turned off
with this command another, unrelated system service might
still synchronize the clock with the network. Also note that
strictly speaking
<filename>systemd-timesyncd.service</filename> does more than
just network time synchronization as it ensures a monotonic
clock on systems without RTC even if no network is
available. See
<citerefentry><refentrytitle>systemd-timesyncd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for details about this.</para></listitem>
</varlistentry>

</variablelist>
Expand Down

0 comments on commit 8731be1

Please sign in to comment.