Re: usplash in desktop task?
* Joey Hess <firstname.lastname@example.org> [070509 20:24]:
> I'm not sure what's totally stupid about this, but any stupidity seems
> limited to this script, /etc/init.d/lvm2, and not to the lsb init script
While that script might be a especialy bad example, the fallacy is in
believing something written in shell and calling commands knowing
nothing about it nor supporting it in general can be used to detect
if a operation was successful or not. Programs normaly output errors
to stderr, and sometimes change a exit code when that happens (though
might be a bit reluctant with anything that could be a non-fatal error).
Success might be defined by some state which needs to be parsed, so the
script needs to know how to judge every possible output and be changed
when new states are added.
While good scripts might help against false-failed, protecting against
false-OKs is quite impossible in this setting. With only few exeptions
errors happen when something unexpected by the programmer happens and
unexpected means you cannot prepare well. Adding another layer of
translation when dealing with unexpected things heavily decreases the
possiblity of getting it right.
Bernhard R. Link