[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] [PATCH] Low: SAPDatabase: remove
From:       Dejan Muhamedagic <dejanmm () fastmail ! fm>
Date:       2011-01-19 11:21:01
Message-ID: 20110119112101.GB4066 () squib
[Download RAW message or body]

On Wed, Jan 19, 2011 at 01:51:12AM +0100, Lars Ellenberg wrote:
> 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 <linux@sap.com>
> > > # 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.

How would it matter here?

> 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.

That's a good idea, though I'd expect users to provide full path
anyway. I hope.

Thanks,

Dejan
_______________________________________________________
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/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic