Hi Greg, Following http://www.cfengine.org/docs/cfengine-Reference.html#copy
if you specify for copy type=ctime, then you will be fine I believe type Normally cfengine uses the ctime date-stamps on files to determine whether a file needs to be copied: a file is only copied if the master is newer than the copy or if the copy doesn't exist. If the type is set to checksum or sum, then a secure MD5 checksum is used to determine whether the source and destination files are identical. If byte or binary is specified, a byte by byte comparison is initiated. An mtime comparison does not take into account changes of file permissions, only modifications to the contents of the files. probably you need to make sure that you keep machines in sync time-wise. P.S. That is just my guess, I haven't try it yet :-) -- Yarik On Thu, Mar 17, 2005 at 02:22:47PM +0100, greg wrote: > Hi, > I'm sure the question has been already talked about, but I can't find an > answer on google/wikis/docs: > I'd like to use cfengine as an "config file installer", in addition with its > ability to "survey" the > config files integrity. > I have 20 servers which have the same config files, but thoses files have > some different line > according to the server: its IP address or hostname for example. So I decided > to use template config > files, and the "copy" and "editfiles" commands, : > copy: > /config_template dest=/.../configfile > server=$(policyhost) > editfiles: > /.../configfile > { > [...] > } > But in this case the copied file will be changed, and the next time cfagent > is run, it will copy it > again. And that's what I can't do, because of the bandwith of the network > between cfagents and cfservd. > So, is their a way to copy the file once, edit it, and be sure the file will > stay the same? If > "editfiles" could update the hash-sum ... > greg -- Yaroslav Halchenko Graduate Student CS Dept. UNM, ABQ Linux User 175555 _______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine