severity 326421 wishlist
thanks
On Sat, Sep 03, 2005 at 02:13:55AM -0400, Tom Metro wrote:
> Suggestion: preprocess config files with m4
> It seems the cleaner approach would be patching logrotate so that it
> calls to an external script to obtain the list of log files to operate
> on. Hopefully such a patch would largely borrow from the existing
> post/pre-rotate script directives. It could be something like:
>
> `/usr/sbin/syslogd-listfiles --weekly` {
> weekly
> olddir /var/log/syslog/old
> sharedscripts
> postrotate
> /etc/init.d/sysklogd reload-or-restart > /dev/null
> endscript
> }
Something like this is a possibility, but there's a lot of work
involved.
> But an even simpler solution, which could be implemented with a fairly
> small and localized patch, would be to preprocess config files with m4
> before logrotate processes them. Then the above becomes:
>
> esyscmd(/usr/sbin/syslogd-listfiles --weekly) {
> weekly
> olddir /var/log/syslog/old
> sharedscripts
> postrotate
> /etc/init.d/sysklogd reload-or-restart > /dev/null
> endscript
> }
>
> and it also open up the door for using other capabilities of m4.
This, definitely, is not. logrotate can't depend on m4 because of its
status. logrotate is a "must have" package, whereas m4 isn't.
--
Paul Martin <[EMAIL PROTECTED]>
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]