[2019-05-16 14:47] Thorsten Glaser <[email protected]>
> On Thu, 16 May 2019, Dmitry Bogatov wrote:
>
> > Having trailing ":" would result of ignoring result these "do_*" functions.
>
> This is normally right. Initscripts must return 0 in most cases,
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Why?

> and only explicitly exit with a nonzero errorlevel when needed.

How do you define "when needed"? In my opinion, ignoring errors must be
explicit (e.g || :), checking for them -- default.

> > Exit status of initscript does not affect boot process: see "startup()"
> > from /etc/init.d/rc (no set -e):
>
> Hmm, what was it then... this is from Policy §9.3.2...

Policy:

        For "init.d" scripts, it’s often easier to not use "set -e" and
        instead check the result of each command separately.

Just a advice, that, in my opinion, promotes reckless scripting.

> but it can make package installation fail, that much is sure.

If initscript is called during postinst and fail -- yes, it interrupts
installation. And it is bug in package.

But how initscripts can fail to install for that reason? They are not
invoked in postinst.
-- 
        Note, that I send and fetch email in batch, once every 24 hours.
                 If matter is urgent, try https://t.me/kaction
                                                                             --

Reply via email to