bug-cfengine
[Top][All Lists]
Advanced

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

Re: import in cfd.conf?


From: Mark . Burgess
Subject: Re: import in cfd.conf?
Date: Fri, 10 Nov 2000 08:44:32 +0100 (MET)

On 10 Nov, Stuart Bishop wrote:
> Hi.
> 
> I've been trying to use the 'import' statement in my cfd.conf file.
> 
> The documentation says it is possible, but I've just noticed that it is for
> 1.6 whereas I am running 1.5.4. So now I try again with 1.6.0.a13, and am
> now getting wierdness. The import commands suceed, but I'm unable to use
> variables defined in the included
> file in my admit: section
> 
> The following fails with an error 'Missing absolute path to a directory'.
> 
> import:
>     globals.cf
> control:
>     cfrunCommand = ( "$(cfengine_bin)/cfengine" )
> admit:
>     $(cfrunCommand)    *.mydomain
> 
> However, if I cut'n'paste globals.cf in, it works:
> 
> control:
>     cfengine_path       = ( "/opt/local/cfengine-1.6.0.a13" )
>     cfengine_bin        = ( "$(cfengine_path)/sbin" )
> 
>     cfrunCommand = ( "$(cfengine_bin)/cfengine" )
> admit:
>     $(cfrunCommand)    *.mydomain
> 
> Is this a bug or user error?
> 

Well, that is a matter of opinion. However, you cannot currently
important variables like this (see dox on import). For the time
being it is a user error, but for the future it is a big.
The reason is that imports only get read after the main file is parsed.
Sorry.

Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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