Bug#629902: dh_installinit: should support LSB compliant scripts

Felipe Sateler fsateler at debian.org
Wed Jan 16 01:08:36 GMT 2019


Bringing in the debhelper maintainers into the loop again.

On Sun, Jan 13, 2019 at 10:31 AM Dmitry Bogatov <KAction at debian.org> wrote:

>
> [ Do you want me to re-submit this patch as merge request? ]
>

Not necessary (yet)


>
> [2019-01-11 14:58] Felipe Sateler <fsateler at debian.org>
> > > [2011-06-14 11:39] Joey Hess <joeyh at debian.org>
> > > >
> > > > part 1     text/plain                 618
> > > > Helmut Grohne wrote:
> > > > > A failure from the update-rc.d cannot make postinst fail, because
> the
> > > > > exit code is not checked.
> > > >
> > > > Yes it is (set -x), but I meant invoke-rc.d anyway, obviously

> > >
> > > > > So in my view the reason for a postinst failure is unrelated to
> > > > > update-rc.d. Can you explain your reasoning?
> > > >
> > > > Simple separation of concerns, invoke-rc.d is responsible for running
> > > > the init script and determining if it fails and propigating a failing
> > > > exit status. debhelper allows it to do do. The right way to make 6 be
> > > > ignored is to get invoke-rc.d to ignore it, not add cruft to every
> > > > postinst that calls it.

> >
> > > Here I propose patch to implement just that:
> > > [...]
> > I'm wary of unintended consequences here. Do we have services that return
> > exit code 6 but as a failure code?
>
> Seems there is nobody, who use exit code 6 for another purposes. You can
> make sure by checking is output of 'grep -R "exit 6" -C6' in directory
> with all init scripts unpacked:
>

<snip>

Rereading invoke-rc.d manpage, it says quite explicitly:

> Should  an init script be executed, invoke-rc.d always returns the status
code returned by the init script.

So it looks like this would be quite the change in behavior.

I wonder what the best approach it. OTOneH, I sympathize with Joey's
argument that these checks should be centralized. OTOtherH, I'm not sure we
can consider invoke-rc.d a debhelper implementation detail and change
behaviour like this.

Maybe a new flag to invoke-rc.d could be used for this? I'm not sure.

-- 

Saludos,
Felipe Sateler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20190115/c7d6c0c9/attachment-0001.html>


More information about the Pkg-systemd-maintainers mailing list