On Mon, Jan 11, 2010 at 07:28:58AM +0100, Mark Burgess wrote:

Neil. You are correct that this option was not implemented. The default value 
of all
boolean type /true/false options is always false, so preserving original perms 
should not
be the default behaviour. I have patched svn to fix this.

I think I spoke to soon.
ettin:/var/cf-masterfiles/config/trunk/inputs# ls -l /tmp/*foo*
-rw-r--r-- 1 neil neil 4 2010-01-11 20:27 /tmp/foobar
-r--r--r-- 1 neil neil 4 2010-01-11 20:26 /tmp/src-foobar

# cf-agent -Kvf ./test.cf|less cf3 cf3 -> Handling file existence constraints on /tmp/foobar
cf3  -> Copy file /tmp/foobar from /tmp/src-foobar check
cf3  -> Destination file /tmp/foobar already exists
cf3  -> Object /tmp/foobar had permission 644, changed it to 444
cf3  -> File /tmp/foobar is an up to date copy of source
cf3 Performance(Copy(localhost:/tmp/src-foobar > /tmp/foobar)):
time=0.0003 secs, av=0.0003 +/- 0.0016
cf3 Existing connection just became free...

Can you reproduce this?  Have I made a mistake?

--
Neil Watson
Linux/UNIX Consultant
http://watson-wilson.ca
######################
body common control {
    bundlesequence => { "test" };
}

bundle common g {
    classes:

        "all" expression => "any";
}

bundle agent test {

    files:

    "/tmp/foobar"
        copy_from => local_cp("/tmp/src-foobar"),
        comment => "check contents only";

    reports:

        all::
}
body copy_from local_cp(from)
{
source      => "$(from)";
compare     => "digest";
#preserve    => "false";
}

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

Reply via email to