/lib/init/init-d-script: exit 0 at end of script prevents all other exit codes

Jonathan de Boyne Pollard J.deBoynePollard-newsgroups at NTLWorld.COM
Thu Nov 15 10:06:56 GMT 2018


Petter Reinholdtsen:

> [...] as far as I know, the init.d scripts do not have a standard for 
> exit codes.
>
Yes, they have.

* 
http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

The adverse interaction between these exit codes and set -e, and the 
mandate that set -e loses, is even called out in Debian Policy, in 
chapter 9.  As is an explicit difference from the standard in the case 
where a package has been removed but the rc script remains.





More information about the Debian-init-diversity mailing list