[arch-projects] [initscripts] [PATCH 20/20] Catch all errors within status blocks

Tom Gundersen teg at jklm.no
Sun Jul 10 16:11:52 EDT 2011

On Sun, Jul 10, 2011 at 6:57 PM, Kurt J. Bosch
<kjb-temp-2009 at alpenjodel.de> wrote:
> Rationale:
> Instead of ignoring any errors of all commands but the last within a status
> block it is much better to use trap to catch them and report 'FAIL'. One
> might for example miss the utmp group which is needed to propperly install
> /var/run/utmp.
> This also makes the code a bit more simple and readable.
> Note:
> We enable this explicitely (by calling stat_err_trap) because most daemon
> scriptlets don't work well with this by now. Moreover we don't use 'set -E'
> to avoid breaking/complicating [custom/hook] functions.

I think this is too complicated for too little gain, especially if it
will not work everywhere and has to be enabled explicitly. We should
avoid being too clever I think. If we want to check for more exit
statuses we should add more " || stat_fail".


More information about the arch-projects mailing list