Hi Lars, Pity I didn't see this earlier, could've saved meself some time :)
On Thu, Nov 10, 2011 at 04:33:02PM +0100, Lars Ellenberg wrote: > 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. Unless you don't need the outcome later. > 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. "user doesn't exit" sounds good too ;-) Cheers, Dejan > > -- > : Lars Ellenberg > : LINBIT | Your Way to High Availability > : DRBD/HA support and consulting http://www.linbit.com > _______________________________________________________ > Linux-HA-Dev: [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
