[KLUG Members] sysklogd

Peter Buxton members@kalamazoolinux.org
Wed, 28 Aug 2002 17:50:41 -0400


On Wed, Aug 28, 2002 at 02:10:15PM -0400, Adam Williams wrote:

> Nope, logroate does it here.  To me it sounds like savelog(8) is an
> attempt to rotate open files,  something logrotate does, but they solved
> the problem without reading the man page.

#! /bin/sh
# savelog - save a log file
#    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
#    Copyright (C) 1992  Ronald S. Karr
# Slight modifications by Ian A. Murdock <imurdock@gnu.ai.mit.edu>:
#	* uses `gzip' rather than `compress'
#	* doesn't use $savedir; keeps saved log files in the same directory
#	* reports successful rotation of log files
#	* for the sake of consistency, files are rotated even if they are
#	  empty

No, sounds older than Debian... offhand, I'd say it's Red Hat that's
being "non-standard" -- but in this case, that's a good thing. Obviously
savelog is an otherwise obsoleted facility that Debian hasn't replaced:
      
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=44523&repeatmerged=yes

http://www.debian.org/doc/debian-policy/ch-files.html#s11.8

And here you can see that logrotate is nearly Debian policy, but the
syslogd maintainer hasn't gotten around to changing this. Maybe he
dislikes logrotate...? Hmmm.... The best thing you can say about using
savelog is that, by using syslog-listfiles, it is utterly dynamic.
Without the syslog maintainer having to push files and coordinate
releases with the logrotate person, syslog rotates all files in
syslog.conf.

That is one thing about .conf/*rc file versus shell scripts: you get to
play all sorts of dynamic havoc in a script that .conf files usually
don't match.

Still, though, there are a lot of ways around that kind of problem:

#!/bin/sh
# /etc/logrotate.conf

if [ -x /usr/sbin/syslogd-listfiles ] ; then
   # rebuild syslog's logrotate.d/ file here, about 2 seconds

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf


Now the logrotate guy need not even worry if syslog is installed or not.


The funny thing about Debian is how rock-solid it is in spite of some
very poor policy decisions. Software in the Public Interest, which is
Debian's umbrella organization, is a registered non-profit *without* a
PayPal account! Now, whatever else you might say about PayPal, it does
actually work. I've used it for a number of things. God only knows how
much dough they'd get with a PayPal account:

http://www.spi-inc.org/donations

but as you can see, they don't have one yet... maybe soon... maybe not.
:-(

-- 
http://www.killdevil.org/~peter
[The Basement Tapes were] like the Watergate tapes... Bob
would say, 'We should destroy this.' -- Robbie Robertson