On Tue, Jan 18, 2011 at 12:15:15PM +0100, Dejan Muhamedagic wrote:
> On Fri, Jan 14, 2011 at 06:10:16PM +0100, Alexander Krauth wrote:
> > # HG changeset patch
> > # User Alexander Krauth <[email protected]>
> > # Date 1295024948 -3600
> > # Node ID 382691345ecf1ebdde093edbe5fb4cf09abf62b5
> > # Parent  7b76bfaf99e1791c9464aa53520ef20fce0a2356
> > Low: SAPDatabase: remove unnecessary usage of eval to start processes
> > 
> > diff -r 7b76bfaf99e1 -r 382691345ecf heartbeat/SAPDatabase
> > --- a/heartbeat/SAPDatabase Fri Jan 14 17:59:23 2011 +0100
> > +++ b/heartbeat/SAPDatabase Fri Jan 14 18:09:08 2011 +0100
> > @@ -541,7 +541,7 @@
> >      if [ -x "$VALUE" ]
> >      then
> >        ocf_log info "Calling userexit ${NAME} with customer script file 
> > ${VALUE}"
> > -      eval "$VALUE" >/dev/null 2>&1
> > +      $VALUE >/dev/null 2>&1

No.
again, you want to do "$VALUE", not $VALUE.

and why are you using [ -x ] here, and have_binary in the other agent?
should probably use the same in both.

Consider enforcing full path and using -x.

> >        ocf_log info "Exiting userexit ${NAME} with customer script file 
> > ${VALUE}, returncode: $?"
> >      else
> >        ocf_log warn "Attribute ${NAME} is set to ${VALUE}, but this file is 
> > not executable"
> > @@ -705,7 +705,7 @@
> >  
> >        if [ -n "$EXECMD" ]
> >        then
> > -        output=`eval ${JAVA_HOME}/bin/java -cp $MYCP $EXECMD 2> /dev/null`
> > +        output=`${JAVA_HOME}/bin/java -cp $MYCP $EXECMD 2> /dev/null`
> >          if [ $? -le 0 ]
> >          then
> >            rc=$OCF_SUCCESS
> > _______________________________________________________
> > Linux-HA-Dev: [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
> 
> Applied. Cheers, Dejan
> _______________________________________________________
> Linux-HA-Dev: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to