
dejan at suse
Aug 16, 2011, 7:31 AM
Post #2 of 6
(543 views)
Permalink
|
|
Re: [PATCH] specify the full path for ipmi command
[In reply to]
|
|
Hi Junko-san, On Tue, Aug 16, 2011 at 01:43:02PM +0900, Junko IKEDA wrote: > Hi, > > I attached a small patch for external/ipmi to specify the full path of > "ipmitool" > There might be a much better way, for example, refer to user's $PATH, > but I encountered the following issue. > http://www.gossamer-threads.com/lists/linuxha/pacemaker/74350 I don't see the connection between the two. > Would you please give me some advices? We can apply the patch you sent. But could you please choose a different name for the parameter, say just "ipmitool", or perhaps "ipmitool_path". "command" seems too generic to me. > diff -r ea850bf2e35e lib/plugins/stonith/external/ipmi > --- a/lib/plugins/stonith/external/ipmi Sat Aug 06 01:37:34 2011 +0200 > +++ b/lib/plugins/stonith/external/ipmi Tue Aug 16 11:41:15 2011 +0900 > @@ -39,7 +39,12 @@ > IPMITOOL=`which ipmitool 2>/dev/null` > > have_ipmi() { > - test -x "${IPMITOOL}" > + if [ -z "${command}" ] > + then > + test -x "${IPMITOOL}" > + else > + IPMITOOL=${command} > + fi This makes the have_ipmi() do a different thing. Why not just leave it as it is and do sth like this above: IPMITOOL=${ipmitool:-"`which ipmitool 2>/dev/null`} > } > > # Wrapper function for ipmitool that sets the correct host IP address, > @@ -237,6 +242,16 @@ > </longdesc> > </parameter> > > +<parameter name="command" unique="0"> > +<content type="string" default="lan"/> default is actually empty. Cheers, Dejan > +<shortdesc lang="en"> > +IPMI command > +</shortdesc> > +<longdesc lang="en"> > +Specify the full path to IPMI command. > +</longdesc> > +</parameter> > + > </parameters> > IPMIXML > exit 0 > Best Regards, > Junko IKEDA > > NTT DATA INTELLILINK CORPORATION > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev [at] lists > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev [at] lists http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
|