Re: [RFC] How should rsyslog handle .0 logfiles from sysklogd
2008/9/19 Michael Biebl <firstname.lastname@example.org>:
> rsyslog, in contrast to sysklogd, uses logrotate to rotate the default
> log files. Unfortunately sysklogd uses a custom log rotate mechanism,
> which starts the log rotate cycle at .0
> The default logrotate configuration starts the log rotate cyle at .1.
ah, cool. :-)
> This leaves .0 files around when you switch from sysklogd to rsyslog 
> which will never be rotated.
> Afaics I have the following options.
> 1.) Do nothing and simply document this fact in README.Debian, telling
> the admin that he can safely delete this files if he no longer needs them.
Hm. Thats probably a safe way. It does not include acting on files
which are in the interest of the local admin without asking him first.
Unfortunately it also means that the admin probably never pays
attention for the logfile (and that he needs to know, which syslog is
installed, so where to find the README.Debian but I guess we can
assume that...). I'm a bit uneasy about that last thing, but general
this is a valid approach.
> 2.) Try to log rotate the .0 files for the default Debian log files in
> postinst. I feel a bit uneasy about this approach, for several reasons:
What does this mean, excatly? You try to log rotate like it would be
normally done by logrotate? Hm. Probably what the user would expect,
but I guess that way is over-complex.
> 3.) Delete the .0 files in postinst. Is this covered by the policy?
Not without a backup or asking the user first. You could ask the user
via debconf. I think this is a case, which would justify it.
> 4.) Use start 0 in /etc/logrotate.d/rsyslog, which would retain old
> sysklogd behaviour. This would mean, that it would still be incompatible
> with all other syslog alternatives  besides old sysklogd. That's why
> I'd keep the logrotate standard configuration.
Bad idea, IMHO.