[Pacemaker] DRBD Management Console 0.6.0
Dejan Muhamedagic
dejanmm at fastmail.fm
Tue Mar 2 19:27:36 UTC 2010
On Tue, Mar 02, 2010 at 07:58:45PM +0100, Lars Ellenberg wrote:
> 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.
Aha, that's what he meant. I was actually asking about:
OCF_RESKEY_vimshbin=optional
Somehow it sounded as if that has some special meaning.
> 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 ;-)
Indeed.
> A common idiom is:
> somevar_DEFAULT=my_default
> somevar=$OCF_RESKEY_somevar
> : ${somevar:=$somevar_DEFAULT}
>
> But you knew all that already, of course.
I have to admit that I always have to check what to use to
override empty but set variables.
Cheers,
Dejan
> 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.
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
More information about the Pacemaker
mailing list