Hi, 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 contradiction. The problem of using "set -e" in init script is even documented in policy 9.3.2: http://www.debian.org/doc/debian-policy/ch-opersys.html#s-writing-init | 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. Cheers, -- Raphaël Hertzog ◈ Debian Developer Pre-order a copy of the Debian Administrator's Handbook and help liberate it: http://debian-handbook.info/liberation/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org