Article View: news.software.nntp
Article #6759Using expdir in news.daily (unoff4)
From: R.D. Thrush
Date: Mon, 22 Apr 1996 00:00
Date: Mon, 22 Apr 1996 00:00
101 lines
3475 bytes
3475 bytes
Invoking news.daily with expdir=/partition_with_space works
correctly; however, the net result is that innd is paused from the end
of the expire until all 130,000 or so articles have been removed.
Without the expdir parameter, expire only pauses innd for a few seconds.
I'm considering the attached patch to news.daily (unoff4). It just
reorders news.daily operations to first move the new history files
into place and restart innd immediately after expire finishes.
Or, maybe someone has a better solution to this problem?
--- news.daily.old Wed Mar 13 10:23:27 1996
+++ news.daily Sun Apr 21 20:52:07 1996
@@ -194,76 +194,75 @@
;;
esac
## Throttle server if we need to.
if [ -n "${MESSAGE}" ] ; then
ctlinnd -s -t120 throttle "${MESSAGE}" 2>&1 || {
( echo "$0: Cannot throttle news"; ${INNSTAT} ) | eval ${MAIL}
exit 1
}
fi
## Actual expire the articles (finally!).
if ${DOEXPLOG}; then
echo "expire begin `date`: (${EXPIREFLAGS})" >>${EXPLOG}
( exec 2>&1 ; eval expire "${EXPIREFLAGS}" ) \
| ${SED} -e 's/^/ /' >>${EXPLOG}
echo " expire end `date`" >>${EXPLOG}
else
eval expire "${EXPIREFLAGS}"
fi
- test -n "${RMFILE}" -a -f "${RMFILE}" && {
- sort -u -o ${RMFILE} ${RMFILE}
- ${DOEXPIREOVER} && {
- eval expireover "${EXPIREOVERFLAGS}"
- DOEXPIREOVER=false
- }
- expirerm ${RMFILE}
- }
- ${DOEXPIREOVER} && eval expireover "${EXPIREOVERFLAGS}"
-
## If built on another filesystem, move history files.
if [ -n "${EXPDIR}" ] ; then
if [ ! -f ${EXPDIR}/history.n -o ! -f ${EXPDIR}/history.n.done ] ; then
( echo "$0: No new history files"; ${INNSTAT} ) | eval ${MAIL}
exit 1
fi
mv -f ${EXPDIR}/history.n ${HISTORY}
mv -f ${EXPDIR}/history.n.dir ${HISTORY}.dir
mv -f ${EXPDIR}/history.n.pag ${HISTORY}.pag
rm -f ${EXPDIR}/history.n.done
case "${EXPIREFLAGS}" in
*-n*)
;;
*)
MESSAGE="${REASON}"
;;
esac
fi
## Restart the server if we need to.
if ${THROTTLED} || test -n "${MESSAGE}" ; then
ctlinnd -s go "${MESSAGE}" 2>&1 || {
( echo "$0: Cannot unthrottle news"; ${INNSTAT} ) | eval ${MAIL}
exit 1
}
fi
+ test -n "${RMFILE}" -a -f "${RMFILE}" && {
+ sort -u -o ${RMFILE} ${RMFILE}
+ ${DOEXPIREOVER} && {
+ eval expireover "${EXPIREOVERFLAGS}"
+ DOEXPIREOVER=false
+ }
+ expirerm ${RMFILE}
+ }
+ ${DOEXPIREOVER} && eval expireover "${EXPIREOVERFLAGS}"
fi
## Renumber the active file.
if ${DORENUMBER} ; then
echo ''
echo 'Renumbering active file.'
if [ -z "${RENUMBER}" ] ;then
ctlinnd -s -t`wc -l <${ACTIVE}` renumber '' 2>&1
else
while read GROUP hi lo flag ; do
ctlinnd -s renumber ${GROUP} 2>&1
sleep ${RENUMBER}
done <${ACTIVE}
fi
fi
${DOLOGS} && {
echo ''
scanlogs ${SCANARG}
}
Technical Details
Message-ID:
<RD.96Apr21214404@mail.thrush.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <RD.96Apr21214404@mail.thrush.com> Subject: Using expdir in news.daily (unoff4) Date: Mon, 22 Apr 1996 00:00:00 +0000 From: rd@mail.thrush.com (R.D. Thrush) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 151078362 Organization: Thrush Consulting Newsgroups: news.software.nntp