Yaroslav Halchenko wrote:
I...got surprised that system wide parameters defined in
/etc/logrotate.conf such as
rotate 4
do not have effect in specific logrotate sections, ie there is no really
default value - it gets assumed to be 1.

This is incorrect. /etc/logrotate.conf does indeed establish defaults. I think you're suffering from a flaw in your test methodology.


[EMAIL PROTECTED]:/home/yoh.m/deb/debs/fail2ban/trunk/debian# logrotate --force 
--verbose /etc/logrotate.d/fail2ban.logrotate
reading config file /etc/logrotate.d/fail2ban.logrotate
reading config info for /var/log/fail2ban.log

Note that there is no debug messages indicating that /etc/logrotate.conf was read. This is because you bypassed the normal mechanism of reading the default /etc/logrotate.conf config file by explicitly specifying /etc/logrotate.d/fail2ban.logrotate.

Try instead:
# logrotate --force --verbose

There doesn't appear to e a way to tell logrotate to rotate only a specific log file from the command line, if you want to preserve the behavior of picking up defaults from /etc/logrotate.conf.

On a side note, the fail2ban.logrotate file name is odd, and I'd recommend caution in naming config files in /etc/logrotate.d/, and logrotate will ignore names matching certain patterns.

 -Tom


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to