scanlogs: remove special handling of expire.log

Florian Schlichting fschlich at CIS.FU-Berlin.DE
Wed Nov 11 09:04:07 UTC 2009


in the course of looking at the OLD/expire.log.0 bug, I wondered why
expire.log would need to be handled specially at all. Turns out there is
no need, and expire.log is rotated just the same without special
mention (see patch below).

BTW has anybody ever thought about replacing scanlogs entirely? I think
it got its name because it used to do what innreport does much better
nowadays, and I wonder if the remainder wasn't better cared for using a
standard program such as logrotate?


diff --git a/scripts/ b/scripts/
index e997077..b6e9170 100644
--- a/scripts/
+++ b/scripts/
@@ -117,7 +117,7 @@ if ${ROTATE} ; then
     ##  Make sure these .old files exist, in case innd is down.
-    for F in ${LOG} ${ERRLOG} ${EXPLOG} ; do
+    for F in ${LOG} ${ERRLOG} ; do
 	if [ ! -f ${F}.old ]; then
 	    rm -f ${F}.old
 	    cp ${F} ${F}.old
@@ -162,7 +162,7 @@ if ${ROTATE} ; then
 	BASE=`basename ${F}`
 	rm -f ${OLD}/${BASE}
 	case ${F} in
 	    ##  Make a link that can be deleted (since if not rotating
 	    ##  we delete the copy that is made in ${TMPDIR}).
 	    mv ${F}.old ${OLD}/${BASE}
@@ -225,7 +225,7 @@ else
     ##  Make a snapshot of what we need for below.
     ctlinnd -s pause "Snapshot log and syslog files" 2>&1
-    for F in ${SYSLOG_CRIT} ${ERRLOG} ${EXPLOG} ${LOG} ${SYSLOG_NOTICE} ; do
+    for F in ${SYSLOG_CRIT} ${ERRLOG} ${LOG} ${SYSLOG_NOTICE} ; do
 	BASE=`basename ${F}`
 	rm -f ${OLD}/${BASE}.0
 	cp ${F} ${OLD}/${BASE}.0
@@ -290,11 +290,6 @@ if ${ROTATE} ; then
-# delete unused OLD/expire.log.0
-BASE=`basename ${EXPLOG}`
-rm -f ${OLD_EXPLOG}
 ##  Compress and rotate the logs.
 if ${ROTATE} ; then
     cd ${OLD}

More information about the inn-workers mailing list