Forum: CFEngine Help
Subject: Re: ?? custom 'compare' option in 'copy_from' ??
Author: hartikka
Link to topic: https://cfengine.com/forum/read.php?3,22890,22913#msg-22913

Thanks Neil.

The first solution in that recipe is a file copy not an edit.


Yup, my mistake. I have no idea how I came to say it was an edit.

This does what you describe. Only copy if there is a difference.

Nope, because remote_cp copies or not based on mtime not my "special way to see 
if any any and all the differences are 'legal'".

Let me give a specific (if silly sounding) hypothetical example:

Suppose I have 100 cfengine-managed systems.

Suppose I want to allow users of each system to reverse any 2 adjacent lines in 
a particular managed text file. 

So I could have 100 different mtimes, 100 different checksums, etc.

But, if the diff between master and managed file works out to one or more 
reversed adjacent lines, then the file is 'legal'.

Is there a standard cfengine way allow this kind 'legal' diff and disallow all 
others?

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to