[Pacemaker] DRBD Management Console 0.6.0

Lars Ellenberg lars.ellenberg at linbit.com
Tue Mar 2 18:58:45 UTC 2010


On Tue, Mar 02, 2010 at 07:28:07PM +0100, Dejan Muhamedagic wrote:
> Hi,
> 
> On Tue, Mar 02, 2010 at 04:19:07PM +0100, Cristian Mammoli - Apra Sistemi wrote:
> > Lars Ellenberg wrote:
> > 
> > >If a "mandatory" parameter has a default,
> > >then I'd think it is no longer mandatory,
> > >because, if not specified, it has its default
> > >to fall back to.
> > >
> > >Explicitly specifying a value that happens
> > >to be the same as the default is fine.
> > >
> > >But to _require_ that you explicitly specify
> > >the default value makes it no longer a default, IMO.
> > >
> > >Mandatory paramters in my opinion should be such paramters
> > >that cannot possibly have a sane default, like the IP for IPaddr2.
> > 
> > Got your point, modified the RA to use:
> > OCF_RESKEY_vimshbin=optional
> > VIMSHBIN="${OCF_RESKEY_vimshbin-/usr/bin/vmware-vim-cmd}"
> > 
> > Thanks to Rasto, didn't know this syntax.
> 
> Which syntax is that actually?

Shell Command Language,
Parameter Expansion,
 Using default values.

http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

actually belongs in a frameset:
http://www.opengroup.org/onlinepubs/9699919799/


Though iirc, the :- form is not supported by very old sh,
and the - form may result in unexpected null values...
More things no-one wants to know about, really ;-)

A common idiom is:
  somevar_DEFAULT=my_default
  somevar=$OCF_RESKEY_somevar
  : ${somevar:=$somevar_DEFAULT}

But you knew all that already, of course.

	Cheers,

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




More information about the Pacemaker mailing list