help-cfengine
[Top][All Lists]
Advanced

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

editfiles problem - revisited


From: Sven Mueller
Subject: editfiles problem - revisited
Date: Thu, 02 Sep 2004 13:52:12 +0200
User-agent: Thunderbird 0.7.3 (Windows/20040803)

Hi.

Remember my editfiles problem? I tried to get it working, but failed on the very first step. Here is what the file to be edited looks like before editing:

test:x:1:1::/tmp/:/bin/bash
test2:x:2:2::/tmp/:/bin/bash

Here is what cfagent.conf looks like:

control:
        actionsequence = ( editfiles )

editfiles:
        { /tmp/passwd
                Backup "Off"
                SplitOn ":"
                ReplaceLinesMatchingField 1
                SetLine "test::::::"
                AppendIfNoLineMatching "ThisLine"
        }

And here is what I thought the file should look like after editing:

test::::::
test2:x:2:2::/tmp/:/bin/bash

And this is how it actually looks like:

test:x:1:1::/tmp/:/bin/bash
test2:x:2:2::/tmp/:/bin/bash
test::::::

The file remains completely unchanged when I remove the "AppendIfNoLineMatching" line from cfagent.conf. Though the documentation of "ReplaceLinesMatchingField" specifically talks about ForEachlineIn OR SetLine.

What did I do wrong?

cu,
sven



reply via email to

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