Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DefineClasses does not set class in editfiles

18 views
Skip to first unread message

Mathias GUG

unread,
Nov 26, 2004, 4:48:54 PM11/26/04
to help-c...@gnu.org
Hello,

I'm using cfengine 2.1.11.

I have a problem with DefineClasses in editfiles.

Here is the content of a cfengine file test.cf :

control:

IfElapsed = ( 0 )
actionsequence = ( editfiles shellcommands )
AddInstallable = ( FileEdited )

editfiles:
{ /tmp/dumb
AutoCreate
Backup "false"
AppendIfNoSuchLine "dumb"
DefineClasses FileEdited
}

shellcommands:
FileEdited::
"/bin/echo dumb2 >> /tmp/dumb"


If I run this file, I only get one line in the dumb file.

Running cfagent -d 2 -f ./test.cf gives this error :

...

Actionsequence item shellcommands
FileEdited is excluded!

...

So it seems that the class is not set when the file is edited.

What did I miss ?


Thank you.


Mathias GUG

Chris Edillon

unread,
Nov 27, 2004, 6:35:14 PM11/27/04
to Mathias GUG, help-c...@gnu.org
On Fri, 2004-11-26 at 16:48, Mathias GUG wrote:

> I have a problem with DefineClasses in editfiles.
>
> Here is the content of a cfengine file test.cf :
>
> control:
>
> IfElapsed = ( 0 )
> actionsequence = ( editfiles shellcommands )
> AddInstallable = ( FileEdited )
>
> editfiles:
> { /tmp/dumb
> AutoCreate
> Backup "false"
> AppendIfNoSuchLine "dumb"
> DefineClasses FileEdited
> }
>

try putting "FileEdited" in quotes.

chris

0 new messages