On Thu, Nov 10, 2011 at 04:11:16PM +0100, Florian Haas wrote:
> Hi Dejan,
> 
> thanks for the feedback! We've worked in most of your suggested changes,
> see below:

> > More direct would be:
> > 
> >     if [ $? -ne 0 ]; then

 $? in a test is almost always an error.
 Because you lose the actual value it had.
 So rather ex=$?, [ $ex ... ], and add $ex to the log message.

 Yo have that error also later in "Asterisk start command failed: $?",
 that will always log 0.

compare the output of the next two lines.
 ( (exit 7); if [ $? -ne 0 ]; then echo "ALWAYS 0!! exit code: $?"; fi )
 ( (exit 7); ex=$?; if [ $ex -ne 0 ]; then echo "exit code: $ex"; fi )

Btw,
 "User $OCF_RESKEY_user doesn't exit"
 there is an s missing.


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to