[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: keeping mtimes in sync
From: |
rader |
Subject: |
Re: keeping mtimes in sync |
Date: |
Thu, 11 Mar 2004 04:31:24 -0600 |
Er, your example shows maintence of *source* mtimes--not destination
mtimes? Is there a way to keep destination mtimes in sync?
$ cat cftest
#!/usr/sbin/cfagent -qIKf
control: actionsequence = ( copy )
copy: /tmp/a dest=/tmp/b type=mtime
$ cp /etc/motd /tmp/a
$ touch -d 01/01/70 /tmp/a
$ ./cftest
cfengine:: Copying from localhost:/tmp/a
cfengine:: Object /tmp/b had permission 600, changed it to 644
$ touch /tmp/b
$ ./cftest # HERE would like cfengine to change /tmp/b's to mtime 01/01/70
$ ls -l /tmp/a /tmp/b
-rw-r--r-- 1 rader rader 83 Jan 1 1970 /tmp/a
-rw-r--r-- 1 rader rader 83 Mar 11 04:27 /tmp/b
steve
- - -
systems & network guy
high energy physics
university of wisconsin
> ---- Original Message ----
> From: Brendan Strejcek
> rader@ginseng.hep.wisc.edu wrote:
>
> > I want to make sure destination mtimes are in sync with my masterfiles.
>
> Locking problem maybe? Note the -K in my example.
>
> $ cat test.cf
> #!/usr/sbin/cfagent -qIKf
> control: actionsequence = ( copy )
> copy: /tmp/a dest=/tmp/b type=mtime
> $ cp /etc/passwd /tmp/a
> $ ./test.cf
> cfengine:: Copying from localhost:/tmp/a
> cfengine:: Object /tmp/b had permission 600, changed it to 644
> $ ./test.cf
> $ touch /tmp/a
> $ ./test.cf
> cfengine:: Update of image /tmp/b from master /tmp/a on localhost
> cfengine:: Object /tmp/b had permission 600, changed it to 644
> $
>
> That's all I can come up with... btw timestamps=preserve is default.