2008/2/16, Victor Lowther <[EMAIL PROTECTED]>: > On Fri, Feb 15, 2008 at 09:07:19AM +0100, Michael Biebl wrote: > > 2008/2/15, Victor Lowther <[EMAIL PROTECTED]>: > > > > > > > > -[ -f /proc/acpi/ibm/led ] || exit 1 > > > > I like explicitly returning 1, because you immediately see, that we > > return 1 in case we don't find the required resource. (This comment is > > true for #13, #11, #9, #7, #6) > > > > > +[ -f /proc/acpi/ibm/led ] || exit > > > > This is imho harder to read and understand. So I vote against removing > > the explicit "exit 1". > > If we are checking for the exit status codes in the script, then this > should actually be an explicit exit 0. > > The reason for that is that these scripts run on all systems, > but if a system does not need the script's functionality, then it is not > a failure, it is just the script recognizing that fact and exiting.
What about a different return code then. So you have: succeeded (0), failed (1), skipped (2). Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? _______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
