help-cfengine
[Top][All Lists]
Advanced

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

Re: editfiles strange behaviour / "Multiple filenames in editfiles"


From: Mark Burgess
Subject: Re: editfiles strange behaviour / "Multiple filenames in editfiles"
Date: Tue, 13 Dec 2005 08:12:55 +0100

You have to put quotes around the strings you are appending to identify
them as data. Otherwise cfengine thinks you are trying to name a new
file to edit.

M

On Mon, 2005-12-12 at 05:19 -0800, Phoenix wrote:
> I am getting "Multiple filenames in editfiles" error when running with
> a configuration that should (according to me anyway) be working... I am
> wondering if anyone can help me with the problem:
> (running cfengine 2.1.13 on Solaris sparc)
> 
> >From the main cfagent.conf I have several sub-configurations depending
> on what is being called.
> 
> in this case I have a variable in cfagent.conf called "TestDir"... this
> variable is empty in the beginning.
> cfagent.conf:
> TestDir = ( "" )
> 
> This variable is later redefined to "/test" in a "testgroup.cf"
> depending on if a machine is in the "test" group or not. The variable
> is then changed for all subsequent .cf files being called, so all
> operations are made in the "/test" dir.
> testgroup.cf:
> control:
> TestDir = ( /test )
> 
> Now, finally I have a "common.cf" which I want to make operations which
> are common to all systems, and it's in the "editfiles" section it seems
> to be complaining and giving the "Multiple filenames in editfiles"
> error. So this is how this section looks, whilst I can't see the error,
> someone else might know how to fix so any help is appriciated, thanks.
> 
> editfiles:
> 
> { $(TestDir)/etc/hosts
> 
> AutoCreate
> EmptyEntireFilePlease
> AppendIfNoSuchLine "127.0.0.1   localhost"
> AppendIfNoSuchLine "$(ipadress) $(host) loghost"
> AppendIfNoSuchLinesFromFile $(ConfigDirectory)/system/hosts
> }
> 
> { $(TestDir)/etc/system
> 
> AutoCreate
> AppendIfNoSuchLinesFromFile $(ConfigDirectory)/system/system
> }
> 
> { $(TestDir)/etc/services
> 
> AutoCreate
> AppendIfNoSuchLinesFromFile $(ConfigDirectory)/system/services
> }
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine





reply via email to

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