Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 69735 Details for
Bug 107906
[PATCH] Logrotate-3.7.1 weekly rotation is not working
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for the problem.
logrotate-3.7.1-weekly.patch (text/plain), 1.14 KB, created by
Boris Zijsling
on 2005-10-02 09:05:48 UTC
(
hide
)
Description:
patch for the problem.
Filename:
MIME Type:
Creator:
Boris Zijsling
Created:
2005-10-02 09:05:48 UTC
Size:
1.14 KB
patch
obsolete
>--- logrotate-3.7.1-old/logrotate.c 2004-10-19 23:41:24.000000000 +0200 >+++ logrotate-3.7.1-new/logrotate.c 2005-10-02 17:29:22.380767321 +0200 >@@ -424,12 +424,15 @@ int findNeedRotating(logInfo * log, int > switch (log->criterium) { > case ROT_WEEKLY: > /* rotate if: >- 1) the current weekday is before the weekday of the >- last rotation >+ 1) the day of the week is the same as the day of the week of >+ the previous rotation but not the same day of the year >+ this will rotate it on the same day every week, but not >+ twice a day. > 2) more then a week has passed since the last > rotation */ >- state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) || >- ((mktime(&now) - mktime(&state->lastRotated)) > >+ state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday && >+ now.tm_yday != state->lastRotated.tm_yday) || >+ ((mktime(&now) - mktime(&state->lastRotated)) > > (7 * 24 * 3600))); > break; > case ROT_MONTHLY:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 107906
: 69735