*really* delete unused OLD/expire.log.0

Florian Schlichting fschlich at CIS.FU-Berlin.DE
Tue Nov 10 11:43:56 UTC 2009


...while this one corrects a long-standing error rotating expire.log

Florian


On 2000-12-05 03:48:46 Katsuhiro Kondou committed a two-line patch with the
message "delete unused OLD/expire.log.0". The patch set a variable that is
never used, and deleted a different, already truncated file. In consequence,
OLD/expire.log.0 would remain as a copy of that day's rotated log file.

This behaviour is corrected to really delete the obsolete OLD/expire.log.0

diff --git a/scripts/scanlogs.in b/scripts/scanlogs.in
index 7cc674e..e997077 100644
--- a/scripts/scanlogs.in
+++ b/scripts/scanlogs.in
@@ -290,8 +290,10 @@ if ${ROTATE} ; then
     fi
 fi
 
-OLD_SYSLOG=${OLD}/${EXPLOG}.0
-rm -f ${EXPLOG}
+# delete unused OLD/expire.log.0
+BASE=`basename ${EXPLOG}`
+OLD_EXPLOG=${OLD}/${BASE}.0
+rm -f ${OLD_EXPLOG}
 
 ##  Compress and rotate the logs.
 if ${ROTATE} ; then




More information about the inn-workers mailing list