On Wed, 07 Jun 2006, martin f krafft wrote: > also sprach Yaroslav Halchenko <[EMAIL PROTECTED]> [2006.06.07.2020 +0200]: > > /etc/init.d/skeleton > > states: > > # Do NOT "set -e" > > since it would cause the script to fail on any failed call to > > function/command, which it shouldn't do but rather process return value. > This is horrible. Might be worth discussing on d-d but I bet there could had been discussion about this fact in initscripts. It used to be there, and now I can't grasp changelog entry which would state removal of -e from skeleton.
> > failingfunc
> > [ $? -ne 2 ] || echo HERE1
> > echo HERE2
> mh. don't code stuff like this then. :)
could you please clarify since it can be
1. don't use || / && but use if; then; fi
2. don't rely on $?
3. ???
--
.-.
=------------------------------ /v\ ----------------------------=
Keep in touch // \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko /( )\ ICQ#: 60653192
Linux User ^^-^^ [175555]
pgpgqQjrFp9j9.pgp
Description: PGP signature

