Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#266 - Logrotation of crond is broken (and package is out of date)
Attached to Project:
Arch Linux
Opened by Andreas Schweitzer - known as andy elsewhere in AL (aschweitzer) - Sunday, 09 November 2003, 16:27 GMT
Last edited by Judd Vinet (judd) - Wednesday, 19 November 2003, 02:04 GMT
Opened by Andreas Schweitzer - known as andy elsewhere in AL (aschweitzer) - Sunday, 09 November 2003, 16:27 GMT
Last edited by Judd Vinet (judd) - Wednesday, 19 November 2003, 02:04 GMT
|
DetailsFirst the easy stuff : the new home of dillon-cron is on http://apollo.backplane.com/FreeSrc/ and not on ibiblio (and freshmeat is out of date, too). Simply flagging would not help here :-)
Now the log rotation (this also applies to the latest version). dcron does not log via syslog. It neither catches SIGHUP. It logs to stdout/stderr. The file /etc/rc.d/crond knows about that. But not using append mode does not allow for log-rotation, since the writing always goes to the same inode and always to a subsequent file position. Currently, after rotation, the logging goes to crond.1 then to crond.2, crond.3 and so forth since logrotate MOVES the file. (see also the README in the source tar ball) Solution : 1) remove /var/log/cron from /etc/logrotate/syslog 2) create /etc/logrotate/crond as : /var/log/crond { sharedscripts copytruncate } 3) Change the startup line in /etc/rc.d/crond to [ -z "$PID" ] && /usr/sbin/crond >> /var/log/crond 2>&1 Note that restarting crond while in a cronjob is probably not a good idea, hence the zero-ing via copytruncate. Also note that crond already does detach and goes into background. Lastly, if users have a huge uptime, the new install may zero out their old cron logfiles if no precautions are taken. |
This task depends upon
Closed by Anonymous Submitter
Wednesday, 19 November 2003, 02:04 GMT
Reason for closing: Fixed
Wednesday, 19 November 2003, 02:04 GMT
Reason for closing: Fixed
Comment by Judd Vinet (judd) -
Wednesday, 19 November 2003, 02:04 GMT
- Task details edited
Fixed in dcron-2.9. Thank you.