|
|
Hi all,
Anyone could help ?
I just do not want the file being distributed every time cfagent is
called when the file is a symlink.
Here is my test conf file:
# cftest.conf
################################################################################
control:
any::
mastercf2 = ( SERVER )
domain = ( exp.td.fr )
actionsequence = ( copy )
DefaultCopyType = ( checksum )
################################################################################
copy:
any::
/usr/local/SYSADM/cfengine2/data/byhost/$(host)/TestLink dest=/tmp/
TEST
m=0555 o=0 g=0 type=mtime linktype=copy server=$(mastercf2)
################################################################################
Here is the test, I've done:
On Cfengine Server
root@SERVER:/usr/local/SYSADM/cfengine2/data/byhost/CLIENT# ls -l
TestLink
lrwxrwxrwx 1 root root 28 Apr 17 13:41 TestLink -
> ../../common/TestRegularFile
root@SERVER:/usr/local/SYSADM/cfengine2/data/byhost/CLIENT# ls -
l ../../common/TestRegularFile
-rw------- 1 root root 15 Apr 17 13:42 ../../common/
TestRegularFile
On Cfengine Client
first time cfagent is called file is copied
root@CLIENT:/usr/local/SYSADM/cfengine2#cfagent -IK -f cftest2.conf
cfengine:CLIENT: Copying from SERVER:/usr/local/SYSADM/cfengine2/data/
byhost/CLIENT/TestLink
cfengine:CLIENT: Group of /tmp/TEST was 1, setting to 0
cfengine:CLIENT: Object /tmp/TEST had permission 600, changed it to
555
every time cfagent is called again , the file is updated
root@CLIENT:/usr/local/SYSADM/cfengine2#cfagent -IK -f cftest2.conf
cfengine:CLIENT: Updated image /tmp/TEST from master /usr/local/SYSADM/
cfengine2/data/byhost/CLIENT/TestLink on SERVER
cfengine:CLIENT: Group of /tmp/TEST was 1, setting to 0
cfengine:CLIENT: Object /tmp/TEST had permission 600, changed it to
555
Thanks in advance for your help,
Lamech2
|
|