[Top][All Lists]

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

Convergence and ReplaceAll

From: Chip Seraphine
Subject: Convergence and ReplaceAll
Date: Fri, 28 Mar 2003 12:02:19 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.2.1) Gecko/20030121


I am attempting to ensure that a given setting in a file is always set to a 
particular value; specifically, I want my coreadm.conf file to contain the line


This is to replace any existing COREADM_GLOB_PATTERN line, or add a new one if 
none exists. Here is the editfiles block I am using to do this:

{ /etc/coreadm.conf
                ReplaceAll "^[[:space:]]*COREADM_GLOB_PATTERN=.*$"
                  With "COREADM_GLOB_PATTERN=/var/core/core.%f.%u-%p"
        DefineClasses "run_coreadm"

The problem is that I am getting this result:

        cfengine:mingle: WARNING: Non-convergent edit operation ReplaceAll 
[COREADM_GLOB_PATTERN=/var/core/core.?f.?u-?p] With 
        cfengine:mingle: Line begins [COREADM_GLOB_PATTERN=]
        cfengine:mingle: Replacement matches search string and will thus 
replace every time - edit was not done
        cfengine:mingle: Error editing file /etc/coreadm.conf

I would understand this if I didn't have the BeginGroupIfNoMatch block.  Is the 
problem that the interpreter doesn't realize the Group stuff protects us from 
nonconvergent behavior, or am I just totally misunderstanding something?  And 
how does everybody else deal with this sort of problem?

reply via email to

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