[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#546743: openssh-server - init script fails on EIO



Colin Watson <cjwatson@debian.org> writes:
> On Thu, Feb 23, 2012 at 02:18:42PM +0100, Didier 'OdyX' Raboud wrote:

>> As far as I understand it, the policy now recommends not to use "set
>> -e" in init scripts. `openssh-server` puts unreasonable (and not
>> policy-backed) requirement on /lib/lsb/init-functions and can therefor
>> fail.

Policy intentionally stops short of recommending against using it and
instead just says that it's problematic and requires careful attention.
If the maintainer is willing to do that work, more power to them.  My
experience as reflected in the Policy bug was that a lot of maintainers
were blindly adding set -e without realizing the issues and thereby
creating init scripts that failed in unexpected ways.

> As such, it seems to me to be quite unwise for a shell library to make
> it impossible to use 'set -e' reliably, regardless of what some people
> think the error-handling policy in callers ought to be.

As mentioned in the Policy bug, I agree with this, and I continue to think
that lsb-base should be fixed to allow init scripts to use set -e if the
maintainer is willing to go to the work of carefully checking exit
statuses.  My inclination would be to ignore errors from the output
functions, since I can't think of any situation where it makes sense for
the init script to fail because it was unable to print output.

> I would say that the first step is to fix init-functions to work with
> 'set -e', and that this would be a good idea independent of any other
> change.

Yes.  I would be very happy to remove that footnote in Policy.  :)

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: