Bug#825913: systemd init script integration: needs manual systemctl daemon-reload after installing initscript

Chris Wilson chris+google at qwirx.com
Tue May 31 18:05:14 BST 2016


Dear Michael,

Thank you for the quick response and patch!

It looks good to me, as a systemd novice. My only questions would be:

* Whether it's possible for the services generated by systemd-sysv-generator
to be masked in their initial state? If so, we might want to check for
not-found before masked, to give systemd a chance to parse the file and see
if it should be masked or not.

* Is systemctl daemon-reload synchronous? When it returns control to the
OS, has systemd run systemd-sysv-generator, has it finished, and has
systemd parsed any new .service files that were generated? If not, then we
might have to wait for that before asking systemd to start the service.

Thanks, Chris.

On 31 May 2016 at 12:41, Michael Biebl <biebl at debian.org> wrote:

> Am 31.05.2016 um 12:16 schrieb Chris Wilson:
> > Jessie's 40-systemd script automatically invokes "systemctl
> daemon-reload" but
> > only when run from a dpkg install. Even this backwards-compatibility
> measure
> > seems to have been removed in unstable.
>
> This is correct. Nowadays invoke-rc.d calls daemon-reload, so doing it
> twice is a bit excessive.
>
> > Please consider invoking "systemctl -p LoadState show $service" from
> 40-systemd,
> > and if it says "not-found" then run "systemctl daemon-reload" to
> generate a
> > service file for it.
>
> I think in a case like yours, where the package manager is not involved,
> doing an implicit reload for not-found in the lsb hook makes sense.
> After all, we are pretty sure the sysv init script actually exists. So
> the missing generated service file is indeed a pretty good indicator for
> a missing daemon-reload.
>
> So something like the attached patch?
>
> Michael
>
> --
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20160531/5ba25a0c/attachment-0002.html>


More information about the Pkg-systemd-maintainers mailing list