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

strange maintscript/init script use


I'm recently looked at a bunch of people's maintscripts, and noted a
number a strange-looking things.  I'm mailing you because you maintain
one of the strangest of them.  If you know more than me, and
everythinig is okay and as intended, then feel free to discard this
message (but consider making it more obvious why things are done in
what seems to be a nonintuitive way, or explaining stuff to me
otherwise :).

The strange things are:

This script isn't set -e, checks for executability of a different
thing than I would expect, based on comparison with other
maintscripts, and calls invoke-rc.d atd stop || true, which both
ignores errors from invoke-rc.d, and fails to stop atd if invoke-rc.d
doesn't exist [0] or returns nonsuccessfully, etc.

This script disables set -e while running the initscript, which itself
isn't set -e.  It also runs the initscript with "sh" instead of
calling it directly.

Runs a ".sh" initscript, which has [recently] been changed to be
sourced, rather than run.  Uses || true, and 2>/dev/null.  At least it
says "don't copy this as an example".

Uses set +e while running the initscripts.

Calls invoke-rc.d without a fall-back calling the init script
directly [0], and ignore the exit status.

[0] It seems like this will fail with initng from experimental, which
doesn't (yet?) have an invoke-rc.d.


Reply to: