Hi Pieter, You might want to have a look at : http://www.cfengine.org/manuals/cf3-reference.html#copy_005ffrom-in-files
Using the compare => "digest", the local file checksum will be compared with the remote file checksum, and the file copied only if the digests differ. And define a class with promise_repaired to restart cups. Regards, Nicolas On Sat, Apr 3, 2010 at 6:13 PM, <fo...@cfengine.com> wrote: > Forum: Cfengine Help > Subject: Remote file comparison (md5) > Author: pieterb > Link to topic: https://cfengine.com/forum/read.php?3,16771,16771#msg-16771 > > Hi all, > > I'm currently writing a set of promises that updates printers.conf if there > are any new printers on the network. I intend to do this as follows: compare > printers.conf from the client to a master printers.conf; if there is a > difference, obtain the correct ppd's, and restart the cups daemon. > I can't seem to find a way to compare the printers.conf file without actually > having to download the file to the client; nor to compare files by md5 > hashing. The way it works now is: download the file, compare mtime(). Is > there a way to make this a little more elegant? > > Thanks, > Pieter > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine > _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine