Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11566 - Sysklogd-Cronjob for daily log rotation does not work
Summary: Sysklogd-Cronjob for daily log rotation does not work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal minor (vote)
Assignee: Maik Schreiber
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-04 04:32 UTC by Adrian Gygax
Modified: 2003-02-04 19:42 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Gygax 2002-12-04 04:32:46 UTC
The '/etc/cron.daily/syslog.cron' script from the actual sysklogd-1.4.1-r2
package does not find the commands 'syslogd-listfiles' and 'savelog' resulting
in a complaining cron. Adding the full path for them fixes this.


#! /bin/sh

# sysklogd	Cron script to rotate system log files daily.
#
#		If you want to rotate other logfiles daily, edit
#		this script.  An easy way is to add them manually
#		or to add -a to syslogd-listfiles and add some grep
#		stuff
#
#		Written by Martin Schulze <joey@debian.org>.
#		$Id: syslog-cron,v 1.1 2002/09/23 00:30:51 g2boojum Exp $

cd /var/log
for LOG in `/usr/sbin/syslogd-listfiles -a`
do
   if [ -f $LOG ]; then
      /usr/sbin/savelog -g adm -m 640 -u root -c 7 $LOG >/dev/null
   fi
done

for LOG in `/usr/sbin/syslogd-listfiles --auth -a`
do
   if [ -f $LOG ]; then
      chown root.adm $LOG
      chmod o-rwx $LOG
   fi
done

# Restart syslogd
#
/usr/bin/killall -HUP syslogd
Comment 1 Adrian Gygax 2002-12-30 15:26:10 UTC
Has been fixed in sysklogd-1.4.1-r3