[pkg-ntp-maintainers] Bug#635752: Bug#635752: ntp: Please include systemd service file
Andreas Henriksson
andreas at fatal.se
Mon May 8 20:11:45 UTC 2017
Hello Kurt, Bernhard,
On Thu, Jul 28, 2011 at 06:27:34PM +0200, Kurt Roeckx wrote:
> On Thu, Jul 28, 2011 at 04:25:16PM +0200, Michael Stapelberg wrote:
> > [...]
> > I created a systemd service file for ntp.
> > [...]
> [...]
> Also, the current file is missing alot of the configuarion options
> that are curruntly supported, like having an ntp.conf provided
> by dhcp.
I looked into implementing a 1:1 service file mapping for the init
script but ended up with something I (as a systemd user) would not want
to use myself. Simply overriding things via systemd native mechanisms
instead of via /etc/default or via init script logic is much more
preferred for a systemd user. Once realising this the only feature of
the init script I deemed worth preserving was the dhcp integration.
(which could be implemented via a
ConditionalPathExists=!/run/ntp.conf.dhcp and another unit with the
reverse logic).
I think it's much better to implement this logic natively in the daemon,
so please see attached patch. Please note that it's gotten basically no
testing at all, so review carefully.
Adding this patch and Stapelbergs original service file, there might
be some additional work to do still where I'd like to hear your
preferred choice:
a/ Add a NEWS.Debian noting that /etc/default/ntp is only considered
on sysvinit systems from now on.
b/ Add ^^^^ + attempt a one-time automatic migration of settings on
upgrade to a native systemd override file.
c/ Like previous plus involve some kind of debconf prompting?
Personally I think a/ would be enough, but maybe b/ would be nice.
What do you think? I'll definitely consider implementing it if that
means we can make progress here.
>
> We now pass the uid/gid of $RUNASUSER, not some (fixed) name and group.
Since I opted for the choice of treating /etc/default file as a
(sysv)init mechanism (only), this would by systemd users be handled
by systemctl edit and overriding the command line as preferred.
> [ snipped parts that where already confirmed are ok as is ]
>
> I will need more information about systemd than what you pointed
> to.
Since you wrote this a long time ago your need for additional info might
have changed by now, but just in case here are some useful resources:
* See series linked from
http://0pointer.net/blog/projects/socket-activated-containers.html
* The official documentation (and examples section), specifically
https://www.freedesktop.org/software/systemd/man/systemd.service.html
There are also numerous good talks available on youtube about systemd.
Happy to assist (when I can) if you have any specific questions.
Helpful expert advice otherwise available on pkg-systemd-maintainers list.
Regards,
Andreas Henriksson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-default-to-run-ntp.conf-.dhcp-if-available.patch
Type: text/x-diff
Size: 1315 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ntp-maintainers/attachments/20170508/e9ef3fc1/attachment.patch>
More information about the pkg-ntp-maintainers
mailing list