INN commit: trunk/scripts (news.daily.in scanlogs.in)

INN Commit rra at isc.org
Fri Feb 12 21:21:41 UTC 2010


    Date: Friday, February 12, 2010 @ 13:21:41
  Author: iulius
Revision: 8979

scanlogs was expecting the default innfeed.conf file to look for the
log file to rotate.

Also fixed a bug in news.daily:  procbatch was called without specifying
the innfeed backlog directory.  See commit [8978].

Modified:
  trunk/scripts/news.daily.in
  trunk/scripts/scanlogs.in

---------------+
 news.daily.in |    8 +++++---
 scanlogs.in   |    7 +++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

Modified: news.daily.in
===================================================================
--- news.daily.in	2010-02-09 20:03:28 UTC (rev 8978)
+++ news.daily.in	2010-02-12 21:21:41 UTC (rev 8979)
@@ -37,14 +37,16 @@
 
 ##  Try to find the path to innfeed's spool.  The default is
 ##  ${PATHSPOOL}/innfeed if not found.
-if [ -f ${INNFEEDCONF} ]; then
+PROCBATCHDIR=
+if [ -f "${INNFEEDCONF}" ]; then
     INNFEEDSPOOL=`${AWK} '{gsub(/:|#/, " & ")} {if ($1 == "backlog-directory" && $2 == ":") print $3}' ${INNFEEDCONF}`
 fi
 test -z "${INNFEEDSPOOL}" && test -d "${PATHSPOOL}/innfeed" && INNFEEDSPOOL="innfeed"
-PROCBATCHDIR="${PATHSPOOL}/${INNFEEDSPOOL}"
+test -n "${INNFEEDSPOOL}" && PROCBATCHDIR="${PATHSPOOL}/${INNFEEDSPOOL}"
 
 ##  If your expire does not pause or throttle innd, enable this next line:
 #MESSAGE="Expiration script $$"
+
 ##  Renumber all at once, or in steps?  Set to the delay if steps (that
 ##  may take a long time!).
 RENUMBER=
@@ -265,7 +267,7 @@
                 done
                 if [ "$FOUND" = "false" ]
                 then
-                    ${PATHBIN}/procbatch -qmu $file
+                    ${PATHBIN}/procbatch -qmu -t ${DIRECTORY} $file
                 fi
             done
         fi

Modified: scanlogs.in
===================================================================
--- scanlogs.in	2010-02-09 20:03:28 UTC (rev 8978)
+++ scanlogs.in	2010-02-12 21:21:41 UTC (rev 8979)
@@ -22,12 +22,15 @@
 ##  Where these programs, if used, write their logs.
 ##  We also have to find innfeed's log file.
 CONTROLBATCH=${MOST_LOGS}/controlbatch.log
-INNFEEDLOG=`${AWK} '{gsub(/:|#/, " & ")} {if ($1 == "log-file" && $2 == ":") print $3}' ${PATHETC}/innfeed.conf`
+INNFEEDCONF=${PATHETC}/innfeed.conf
+if [ -f "${INNFEEDCONF}" ]; then
+    INNFEEDLOG=`${AWK} '{gsub(/:|#/, " & ")} {if ($1 == "log-file" && $2 == ":") print $3}' ${INNFEEDCONF}`
+fi
 INNFEED=
 for F in "${INNFEEDLOG}" ; do
     test -f "${MOST_LOGS}/${F}" && INNFEED="${INNFEED} ${MOST_LOGS}/${F}"
 done
-test -z "${INNFEED}" && test -f ${MOST_LOGS}/innfeed.log && INNFEED="${MOST_LOGS}/innfeed.log"
+test -z "${INNFEED}" && test -f "${MOST_LOGS}/innfeed.log" && INNFEED="${MOST_LOGS}/innfeed.log"
 NNTPSEND=${MOST_LOGS}/nntpsend.log
 PERLNOCEM=${MOST_LOGS}/perl-nocem.log
 SENDIHAVE=${MOST_LOGS}/send-ihave.log




More information about the inn-committers mailing list