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
> 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