help-cfengine
[Top][All Lists]
Advanced

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

editfiles strange behaviour / "Multiple filenames in editfiles"


From: Phoenix
Subject: editfiles strange behaviour / "Multiple filenames in editfiles"
Date: 12 Dec 2005 05:19:39 -0800
User-agent: G2/0.2

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
}



reply via email to

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