Bug#208010: [PROPOSAL] init script LSB 1.3 compliance
On Thu, Sep 04, 2003 at 01:36:06 +0200, Wouter Verhelst wrote:
> > > > + <tag>7</tag>
> > > > + <item>program is not running,</item>
> > >
> > > This one will break removing and upgrading packages; dpkg checks the
> > > exit code of maintainer scripts, assuming they failed if the exit code
> > > was nonzero. Given the fact it is recommended by policy to use set -e in
> > > maintainer scripts, dpkg will pick up this exit code and mark the
> > > package as failed in the deconfiguration phase. Either this requirement
> > > should be removed, or policy should warn maintainers of that fact.
> > In the deconfiguration phase "invoke-rc.d package stop" is run. What
> > error do you imagine here, which should not be reported to/by dpkg?
> invoke-rc.d will pass the exit state on. According to invoke-rc.d's
> manpage, a non-zero exit state "usually indicates a failure".
> That isn't the case here; when the 'stop' target is invoked, and the
> program wasn't running, a non-zero exit code is issued, even though the
> status is actually what is requested.
> Dpkg will consider any non-zero exit state as 'failed', and will stop
> uninstalling the package.
exit 7 should never occur in the stop target, this would contradict
policy anyway. If the init script exits with 7, say, in the reload
target, I think that would be o.k. I'll rephrase it. Thanks!