[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: undefined variable test

From: Andrews, Martin
Subject: RE: undefined variable test
Date: Mon, 13 Jan 2003 22:12:42 -0500

I've just been messing with it - IsDefined() - like so:

  have_myvar = ( IsDefined(myvar) )

  "/bin/echo myvar is $(myvar)"

I had been hoping to use it to get default values for variables like this:

  basedir = ( /opt )

Alas, it appears you can only use IsDefined() in groups definitions and
those are evaluated after the control section. I could probably work around
it with imports but that is nasty. Any chance of widening the availability
of IsDefined() Mark?


> -----Original Message-----
> From: Luke A. Kanies [mailto:address@hidden
> Sent: Monday, January 13, 2003 8:21 PM
> To: address@hidden
> Subject: undefined variable test
> Hi,
> I swear there is some test I can do to see if a variable is defined in
> cfengine, but I can't find it.  I've looked through the Tutorial,
> Reference, and example files and just can't find it.
> Is there such a thing, and if so, what is it?
> Thanks,
> Luke
> -- 
> Death and taxes are inevitable; at least death doesn't get worse every
> year.
> _______________________________________________
> Help-cfengine mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]