bug-cfengine
[Top][All Lists]
Advanced

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

Re: Varpath in control not setting variable


From: Hugo Gayosso
Subject: Re: Varpath in control not setting variable
Date: 29 May 2002 08:47:18 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adrian Phillips <address@hidden> writes:

> Okay, I give up. I've been trying to figure this one out for a couple
> of days and I'm stuck :-(
> 
> The following is not setting the variable when gds.cfinternal is
> true. It sets it okay for gds.!cfinternal though. Note that if cfrep
> is replaced by /usr/local/cfengine then it works.
> 
> control:
>       gds.!cfinternal::
>               gds_home = ( /dnmi/gds )
>       gds.cfinternal::
>               gds_home = ( ${cfrep}/dnmi/gds )
> 
> #************************************************************************
> #************************************************************************
> classes:
>       gds_mounted = ( "/bin/sh -c '/bin/mount | grep -q ${gds_home}'" )
> 
> ${gds_home} never gets defined even though it looks like from the
> debug output that control is parsed before classes.
> 
> Am I missing something here ?

[...]

I use $(varname) instead of ${varname}, I don't know if that makes a
difference.

Also, this might be a problem (from docs):

  "Note that, if you define variables in an imported file they will
   not be defined for operations in their parent files. This because
   cfengine reads in all the import files after the main file has been
   parsed--not at the place where you call import in your script. This
   means that variables or macros defined in imported files are only
   defined after the main program. Variables from earlier files are
   inherited by later includes, but not _vice-versa_."

- -- 
Hugo Gayosso
Support the Free Software Movement!
GNU Project <http://www.gnu.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE89M3Wx2JZtTN6co8RAlM8AKD2ylDKprHdIudpZCWIyv4eM6xLdwCeJI57
5eSn6fIJ2gI4yHGPNDvzEuI=
=lLPN
-----END PGP SIGNATURE-----



reply via email to

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