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

Re: really? (Debian Policy and LSB)

Ah thanks.  YEs that rings a bell now.

On 11/04/12 21:04, Raphael Hertzog wrote:

On Wed, 11 Apr 2012, Nicholas Bamber wrote:
Hmm... This contradicts section 6.1 of the Debian policy.

"The package management system looks at the exit status from these
scripts. It is important that they exit with a non-zero status if

Here "these scripts" refer to "package maintainer scripts"
({pre,post}{inst,rm}) and not to "init scripts". So there's no

The problem of using "set -e" in init script is even documented
in policy 9.3.2:

| Be careful of using set -e in init.d scripts. Writing correct init.d
| scripts requires accepting various error exit statuses when daemons are
| already running or already stopped without aborting the init.d script, and
| common init.d function libraries are not safe to call with set -e in
| effect[72]. For init.d scripts, it's often easier to not use set -e and
| instead check the result of each command separately.
| [72] /lib/lsb/init-functions, which assists in writing LSB-compliant
| init scripts, may fail if set -e is in effect and echoing status messages
| to the console fails, for example.


Reply to: