[systemd-devel] Upstream service file for NTP daemon chrony
Lennart Poettering
lennart at poettering.net
Mon Jul 9 17:00:32 PDT 2012
On Sat, 30.06.12 01:00, Paul Menzel (paulepanter at users.sourceforge.net) wrote:
> It was pointed out that the service files above are very Fedora
> specific. Mantas pointed out that Arch Linux now ships unit files
> directly [4]
>
> [Unit]
> Description=Chrony Network Time Daemon
>
> [Service]
> Type=forking
> ExecStart=/usr/sbin/chronyd
> PIDFile=/var/run/chronyd.pid
>
> [Install]
> WantedBy=multi-user.target
>
> and therefore the pull request above was rejected. Furthermore David had
> some great ideas whose result is quite similar to the service file in
> Arch Linux.
>
> [Unit]
> Description=Chrony Network Time Daemon
> After=nss-lockup.target syslog.target
After=syslog.target is obsolete and should go.
> [Service]
> ExecStart=/usr/sbin/chronyd -n
>
> [Install]
> WantedBy=multi-user.target
Afair there's a client to chrony called chronyc. If somebody uses that
in another service and wants to order that after the chrony service it
would be a good idea to use type=forking, so that the client doesnt
access the server too early, when the socket isn#t established yet.
> David suggested that a separate system user could be used for this
> daemon too and systemd should do this.
chrony already has -u for that, right? So we should use that (which the
Fedora unit file gets right afaics)
> And lastly, in the directory `units/` of the systemd source tree
> contains `time-sync.target` and the Fedora services use that too. But
> reading the manual of systemd.special, my take on this is this is just a
> compatibility file and should not be used in a systemd service file.
Well, it was born out of compatibility, but probably makes sense to
support for good. I guess the manpage could be clarified about
that. (added to the TODO list now)
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list