Description of problem: The post rotate scripts on weekly and monthly rotations jobs are running every day. Version-Release number of selected component (if applicable): logrotate-3.5.9-1 How reproducible: Every time Steps to Reproduce: Create configuration file for a weekly rotations job. Example files in /etc/logrotate.d âcat apacheâ /usr/local/apache/logs/*log { weekly rotate 6 compress delaycompress olddir /usr/local/apache/logs/arhiiv sharedscripts postrotate /usr/local/apache/bin/apachectl graceful /bin/sleep 10 /root/bin/webalizer.1 endscript } or original RH syslog file âcat syslogâ: /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /v ar/log/boot.log /var/log/cron { sharedscripts postrotate /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true endscript } 2. Check message log or check mail from cron daemon on next days. Actual results: I âm getting a mail from cron daemon every day: Subject: Cron <root@brc> run-parts /etc/cron.daily /etc/cron.daily/logrotate: /usr/local/apache/bin/apachectl graceful: httpd gracefully restarted The post rotate script for syslog is running every day (lines from message log): Jan 11 04:14:28 www syslogd 1.4.1: restart. Jan 12 04:09:26 www syslogd 1.4.1: restart. Jan 13 04:08:02 www syslogd 1.4.1: restart. Jan 14 04:09:20 www syslogd 1.4.1: restart. Jan 15 04:09:07 www syslogd 1.4.1: restart. Jan 16 04:08:32 www syslogd 1.4.1: restart. Jan 17 04:07:59 www syslogd 1.4.1: restart. Expected results: The post rotation script should run only once a week. There should be only one line per week in a message log. Additional info:
Can you verify that the actual logfile rotation is happening as well? Weekly rotation happens if: 1. The current weekday is before the weekday of the last rotation 2. More than a week has passed since the last rotation.
Actual logfile rotation is happening on every Sunday. But post scripts are running every day.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2005-054.html