[pkg-ntp-maintainers] Bug#635752: ntp: Please include systemd service file

Jordi Pujol Palomer jordipujolp at gmail.com
Thu Sep 25 12:10:46 UTC 2014


Hi,

to complete the configuration of systemd-timesyncd.service we must
edit 
/etc/systemd/tymesyncd.conf
and enable some servers,

Disclaimer:
My previous answer is very radical for them that are accustomed
to ntpd, so following is included a configuration of ntp that seems has
worked well for me:

***
[Unit]
Description=Network Time Service
DefaultDependencies=no
Conflicts=shutdown.target systemd-timesyncd.service
After=network.target syslog.target ntpdate.service sntp.service

[Service]
Type=forking
EnvironmentFile=-/etc/default/ntp
ExecStart=/usr/sbin/ntpd $NTPD_OPTS -p /run/ntpd.pid
#Slice=service-server.slice

[Install]
WantedBy=multi-user.target
***
Observe that the link to ntp.service in directory multi-user.target.d
must be created manually

ln -s ../ntp.service /lib/systemd/system/multi-user.target.d/ntp.service

because 
systemctl enable
does not create installation links for services that also exist
in /etc/init.d (may be it is a bug)

also, when using /var/lib/ntp/ntp.conf.dhcp
we may change NTPD_OPTS in /etc/default/ntp

NTPD_OPTS="-q -c /var/lib/ntp/ntp.conf.dhcp"

Regards,

Jordi Pujol



More information about the pkg-ntp-maintainers mailing list