2009-03-09 00:25:57 +01:00
|
|
|
Index: Makefile
|
|
|
|
===================================================================
|
|
|
|
--- Makefile.orig 2008-05-19 12:25:54.000000000 +0200
|
|
|
|
+++ Makefile 2009-03-06 13:57:22.000000000 +0100
|
2008-09-06 00:08:20 +02:00
|
|
|
@@ -61,7 +61,7 @@
|
2007-01-16 00:24:09 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
BINDIR = $(BASEDIR)/sbin
|
|
|
|
-MANDIR = $(BASEDIR)/man
|
|
|
|
+MANDIR = $(BASEDIR)/share/man
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
|
2009-03-09 00:25:57 +01:00
|
|
|
Index: examples/logrotate.cron
|
|
|
|
===================================================================
|
|
|
|
--- examples/logrotate.cron.orig 2003-07-09 21:36:35.000000000 +0200
|
|
|
|
+++ examples/logrotate.cron 2009-03-06 13:57:22.000000000 +0100
|
2007-01-16 00:24:09 +01:00
|
|
|
@@ -1,8 +1,17 @@
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
-/usr/sbin/logrotate /etc/logrotate.conf
|
|
|
|
-EXITVALUE=$?
|
|
|
|
+TMPF=`mktemp /tmp/logrotate.XXXXXXXXXX`
|
|
|
|
+
|
|
|
|
+/usr/sbin/logrotate /etc/logrotate.conf 2>&1 | tee $TMPF
|
|
|
|
+EXITVALUE=${PIPESTATUS[0]}
|
|
|
|
+
|
|
|
|
if [ $EXITVALUE != 0 ]; then
|
|
|
|
- /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
|
|
|
|
+ # wait a sec, we might just have restarted syslog
|
|
|
|
+ sleep 1
|
|
|
|
+ # tell what went wrong
|
|
|
|
+ /bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
|
|
|
|
+ /bin/logger -t logrotate -f $TMPF
|
|
|
|
fi
|
|
|
|
+
|
|
|
|
+rm -f $TMPF
|
|
|
|
exit 0
|