ntpd.service change

Richard Laager rlaager at wiktel.com
Tue Mar 6 20:09:14 UTC 2018

On 03/06/2018 09:06 AM, Udo van den Heuvel wrote:
> I must look into this way of solving things as it did not work for me yet.
> I installed the default ntpd.service file.
> Then in  /etc/systemd/system/ntpd.service.d/ I created
> 10-environment.conf with contents:
> EnvironmentFile=-/etc/sysconfig/ntpd
> ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS
> /etc/sysconfig/ntpd contains:
> # Command line options for ntpd
> OPTIONS="-g"
> But it appears that these suggestions are not used (despite reload of
> systemd) as the -N option is still passed to ntpd.

Previously, you could not override ExecStart, only add to it. In systemd
197 (available in Fedora 18), this syntax should work:

ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS

The empty ExecStart= indicates that you are clearing out the previous
ExecStart entry (or entries, but that's not applicable here) and then
you add your replacement.

See this, especially starting at comment 9:

Note that I have not personally tested this. If this doesn't work for
you, what is your systemd version, and what is the output of `systemctl
show ntpd.service`?


More information about the devel mailing list