help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pb with rotate in cf.site


From: Pierrick PONS
Subject: Re: pb with rotate in cf.site
Date: Mon, 10 Nov 2003 16:37:16 +0100

> This is incorrect. Cfengine copies the data to a new file and
> truncates the current file to zero size so that writes
> are unaffected.
> 

Are you sure ?

Here :
http://linuxselfhelp.com/gnu/cfengine/html_chapter/cfengine-Reference_1.html#IDX170

You can read :
"
 disable:

    filename  rotate=4


then cfengine renames the file concerned by appending `.1' to it and a new, 
empty file is created in its place with the same owner and permissions. The 
next time disable is executed `.1' is renamed to `.2' and the file is renamed 
`.1' and a new empty file is created with the same permissions. Cfengine 
continues to rotate the files like this keeping a maximum of four files. This 
is similar to the behaviour of syslog.
"

so I think cfengine behaves like a mv and then a touch . And I have problem 
because my script is still writting to the old log file, not on the new empty 
file.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]