[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
EndGroup without Begin
From: |
Michael Spindler |
Subject: |
EndGroup without Begin |
Date: |
16 Mar 2006 21:51:43 -0800 |
User-agent: |
G2/0.2 |
Hi!
Following situation:
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
Version: cfengine-2.1.18
Because of problems in our production enviroment, I set up a small test
case: In editfiles, I try to add a string to a line which begins with a
keyword.
test.txt:
---
[root@sv2277 ~]# cat /tmp/test.txt
nokeyword
keyword
nokeyword
---
Configuration in cfagent.conf:
---
editfiles:
sv2277::
# Test edit
{ /tmp/test.txt
BeginGroupIfLineMatching "^keyword"
AppendToLineIfNotContains " StringToAdd"
EndGroup
}
---
I get the following output:
---
cf:cfengine::/var/cfengine/inputs/cfagent.conf:50: EndGroup without
Begin
cf:cfengine::/var/cfengine/inputs/cfagent.conf:51: Editfiles Begin/End
mismatch before or at line
---
Output in debug-mode:
---
DEFINED FILE EDITS
EDITFILE /tmp/test.txt (n)(r=0)
Context scope: main
IfElapsed=1, ExpireAfter=2
BeginGroupIfLineMatching [^keyword] if (sv2277)
AppendToLineIfNotContains [ StringToAdd] if (sv2277)
EndGroup [nodata] if (sv2277)
---
Any ideas?
Best regards,
Michael
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- EndGroup without Begin,
Michael Spindler <=