ExpandVariables won't work in my case, since lines are added based on
classes. So I don't want variables in there for classes that are not
going to get defined. (unless I use variables for large blocks of
text; and that has it's own problems)

My testing indicates that as long as the file is only modified within
"editfiles" then the behavior I am looking for is already built into
cfengine.

I found that if I use editfiles to AutoCreate, EmptyEntireFilePlease,
InsertFile, DefineClasses; then I can put additional
AppendIfNoSuchLine, DefineClasses in other config files and cfengine
will only define the class if the final result of the edits differs
from the destination. No version tags necessary. But any "copy"
declaration that could modify the file will cause the class to be
defined every time. (Such as copying the template and then using
editfiles to modify it.)

On 1/17/06, Brendan Strejcek <[EMAIL PROTECTED]> wrote:
> If you are using a new enough cfengine, you can also use ExpandVariables
> in editfiles.
>
>     http://www.cfengine.org/docs/cfengine-Reference.html#index-Templates-362
>
> Best,
> Brendan
>
> --
> Senior System Administrator
> The University of Chicago
> Department of Computer Science
>
> http://www.cs.uchicago.edu/people/brendan
> http://praksys.blogspot.com/
>


--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--


_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to