Quoting Russ Allbery (r...@debian.org):
> Cameron Norman <camerontnor...@gmail.com> writes:
> 
> > Oh this is easy. The init script calls s-s-d and does not check the return
> > code (so always exits 0). I am just going to use set -e in the init
> > script, only a couple tweaks are needed.
> 
> Please don't use set -e in init scripts.  See 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.  For init.d scripts, it's often easier to not use
>     set -e and instead check the result of each command separately.
> 
> Not mentioned there is another problem, namely that LSB mandates
> particular exit codes for particular conditions in init scripts, and set
> -e will not produce the correct exit codes.

No worries, I've gone a different route - borrowing heavily (and
appreciatively) from the libvirt init scripts.


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140725233710.GS31507@ubuntumail

Reply via email to