Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52672 - dcron does not provide logrotate snippet
Summary: dcron does not provide logrotate snippet
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-01 03:28 UTC by BlueRaven
Modified: 2004-11-10 16:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Logrotate snippet for dcron (dcron.logrotate,125 bytes, text/plain)
2004-10-10 08:42 UTC, BlueRaven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BlueRaven 2004-06-01 03:28:57 UTC
I noticed that dcron does not insert a snippet in /etc/logrotate.d in order to have /var/log/cron.log automatically rotated.
I think it would be important to provide one, since an evergrowing logfile could fill all the available space, possibly with weird effects if /var or /var/log is not on its own partition.
Comment 1 SpanKY gentoo-dev 2004-10-05 06:02:22 UTC
i dont know anything about logrotate ... i use metalog so this has never been an issue :)

please post a sample config file and i'll gladly add it to dcron
Comment 2 BlueRaven 2004-10-10 08:42:38 UTC
Created attachment 41462 [details]
Logrotate snippet for dcron

This is the sample config file you asked me for. :-)
Comment 3 BlueRaven 2004-10-10 08:44:38 UTC
Hi there, I am reopening the bug just to provide the requested logrotate snippet for dcron.
Hope it will be included soon and the bug definitely closed. :-)
Comment 4 SpanKY gentoo-dev 2004-10-10 17:56:07 UTC
will do :)
Comment 5 BlueRaven 2004-10-19 02:01:05 UTC
Comment on attachment 41462 [details]
Logrotate snippet for dcron

># dcron logrotate snippet for Gentoo Linux
># contributed by BlueRaven
>#
>
>/var/log/cron.log {
>}
Comment 6 BlueRaven 2004-10-19 02:03:52 UTC
Hi, my proposed snippet was wrong... dcron keeps file descriptors always open, so using logrotate's "create" instruction breaks functionality.
Please find an updated snippet in the previous comment, sorry for any inconvenience.
Comment 7 SpanKY gentoo-dev 2004-11-07 22:47:48 UTC
so all the file has to contain is this ?

/var/log/cron.log {
}
Comment 8 BlueRaven 2004-11-09 05:02:57 UTC
Well, in fact no... I noticed it was not working, too.
Please accept my apologizes, my pusher is decreasing his quality standards. ;-)
After some RTFM, I found out a working configuration:

/var/log/cron.log {
             copytruncate
}

The "copytruncate" directive is necessary in order to keep the same file inode.
Comment 9 SpanKY gentoo-dev 2004-11-09 21:06:34 UTC
so i add that little snippet to 'files/dcron.logrotate' and then i add this to the ebuild:
    insinto /etc/logrotate.d
    newins ${FILESDIR}/dcron.logrotate dcron

and that should be enough ? (sorry, but ive never used logrotate before)
Comment 10 BlueRaven 2004-11-10 08:49:02 UTC
Yes, that's enough! :-)
Comment 11 SpanKY gentoo-dev 2004-11-10 16:41:52 UTC
added to cvs, thanks :)