Matthew Soffen wrote:
On Tue, 2006-05-02 at 22:46 +0200, Andrew Beekhof wrote:
On May 2, 2006, at 10:37 PM, Matthew Soffen wrote:
Andrew,
The command which fails
cmd=`which -s $1`
If the command isn't there, then which returns 1 ( which the handler
catches as a failure and exits the script).
it doesn't do that here. does it do that on linux?
Nope. It works fine.
and i still dont understand how what you have helps because later on
you have:
if
$cmd >/dev/null 2>&1
then
so you still run the "which" part anyway.
I'm thinking that its because of the if statement trapping the error.
Incorrect exit codes don't stop set -e if they're tested by an if statement.
--
Alan Robertson <[EMAIL PROTECTED]>
"Openness is the foundation and preservative of friendship... Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/