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

Michael Stapelberg michael+db20090501 at stapelberg.de
Tue Aug 30 13:57:35 UTC 2011


Hi,

For some reason, I did not receive your email, so please excuse the long delay.
Maybe you could check the logfile of your server and could send me the
appropriate lines telling that the mail was delivered at our server? I can’t
find any trace of it in my logs :-/.

There’s news on the NTP upstream side: They won’t ship a systemd service file,
since they also don’t ship an init script:
http://bugs.ntp.org/show_bug.cgi?id=1979

Now to your mail:

> I'm not sure what Debian's policy is for this.  As far as I know,
> this is all still open for debate.
I didn’t follow any discussions on that. Probably it will take a while until an
official policy exists. I would argue that including the systemd file for now
doesn’t hurt, right? :)

> Also, the current file is missing alot of the configuarion options
> that are curruntly supported, like having an ntp.conf provided
> by dhcp.
Hm, I don’t know enough about the way NetworkManager etc. handles this, so I
can’t really make a statement :-/. Still, I guess having a systemd service file
at all is better than not having one ;-).

> We now pass the uid/gid of $RUNASUSER, not some (fixed) name and group.
Yeah, but by default it’s ntp. I would guess that most users of ntpd do not
change the user under which it is running (what’s the benefit?). Those who want
to do that can copy /lib/systemd/system/ntp.service to
/etc/systemd/system/ntp.service and edit it.

> It's now passing -n and not passing the PID file.  I guess at least
> the PID file part is normal for systemd.
Not using a PID file is normal, yes.

> It has:
> After=network.target
> 
> Which might be different then:
> # Required-Start:  $network $remote_fs $syslog
A little. $remote_fs is in the init script for /usr, but systemd does not
support having /usr not pre-mounted when booting, see
http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken

For $syslog, we can make it After=network.target syslog.target which does not
hurt and is even recommended in daemon(7). I did not know that at the time I
sent the service file. Not having it doesn’t break anything, since on recent
systems, syslog will be invoked by socket activation.

> And:
> [Install]
> WantedBy=multi-user.target
> Whatever that means.
This means that when using 'systemctl enable ntp.service', a symlink should be
installed in the multi-user.target, which corresponds to the multi-user
runlevel (see init(8)). This mechanism is the equivalent of what update-rc.d
does.

> I will need more information about systemd than what you pointed
> to.
Are all your questions answered by this mail? If not, please ask :).

Best regards,
Michael

BTW: I recently submitted some packaging to smartmontools, maybe it’s helpful
to you: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;bug=639631





More information about the pkg-ntp-maintainers mailing list