summaryrefslogtreecommitdiff
path: root/package/logrotate/patches/logrotate-3.7.1-weekly.patch
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-02-15 15:36:28 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-02-15 15:36:28 +0000
commit1fa1dadaa96e11c23c30f0a5180cfbc360f055f7 (patch)
treefae5ed96187e8445584f02cd465490e6589e7673 /package/logrotate/patches/logrotate-3.7.1-weekly.patch
parent32b8bfb796174e0b179f7ed5e175235a5876f8ef (diff)
Added logrotate, fixed CP call in httping, added bind splitting, thanks to Sébastien Bourgasser
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3243 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/logrotate/patches/logrotate-3.7.1-weekly.patch')
-rw-r--r--package/logrotate/patches/logrotate-3.7.1-weekly.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/package/logrotate/patches/logrotate-3.7.1-weekly.patch b/package/logrotate/patches/logrotate-3.7.1-weekly.patch
new file mode 100644
index 0000000000..8a371e8e00
--- /dev/null
+++ b/package/logrotate/patches/logrotate-3.7.1-weekly.patch
@@ -0,0 +1,22 @@
+--- 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: