🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Simon J Gerraty Wed, 06 Feb 1991 00:18
Re: NEWSBIN/maint/newsdaily discards old NNTP input archives
#956
Author: Simon J Gerraty
Date: Wed, 06 Feb 1991 00:18
73 lines
3429 bytes
In <1991Feb5.022948.3952@melb.bull.oz.au> sjg@melb.bull.oz.au (Simon J. Gerraty) writes:
>This seems to apply to both NNTP and C news so I'm posting to
>both groups.

>My site gets its news feed via NNTP over a rather slow, and
>unreliable X.25 link.    I have been for some time getting
>reports from newsdaily about old input files named "nntp.annnn"
>where nnnn is the pid of the NNTP daemon that created them.

>NNTP normally converts these files to all numeric names so that
>newsrun will inject them into News.  Obviously on my system,
>NNTP is occasionally (some times frequently) terminating without
>doing this.

>As destributed newsdaily reports the names of the old input
>files and discards them.  The following patch, reports the names
>and converts them to numeric names.  In most cases the batches
>inject into News without problem.  If they end up in
>in.coming/bad you at least had a second bite at them :-)

>Perhaps it would be useful to distribute this patch (or similar)
>with NNTP as obviously not all sites use NNTP - just as not all
>sites use C news.

_Sorry_, there is an error in the patch.  Once the nntp.aXXXX file
is mv'd it is still older than one day and gets removed (how
embarrassing :-)
This is a corrected version. 
Also I decided (perhaps unwisely) to try and save nspool.aXXXX
files as well.

Also, one reader suggested that NNTP does not simply rename the
temp batches.  The NNTP-1.5.10 that I run does and then just
kicks off newsrun to do the processing.  Refer to enqueue() in
server/batch.c

*** newsdaily.orig	Mon Feb  4 16:28:41 1991
--- newsdaily	Wed Feb  6 10:48:33 1991
***************
*** 62,67 ****
--- 62,84 ----
  
  # look for input anomalies
  cd $NEWSARTS/in.coming
+ #
+ # first look for any nntp.a files that should be enqueued
+ # we have been throwing these away!
+ #
+ find . \( -name 'nntp.a*' -o -name 'nspool.a*' \) -mtime +1 -print >$tmp
+ if test -s $tmp		# old nntp archives
+ then
+ 	(
+ 		echo 'NNTP archives left about:'
+ 		cat $tmp
+ 		echo 'These have been injected to News'
+ 	) >> $gripes
+ 	# Now inject them - convert them to numeric names
+ 	# they will all appear as 6666nnnn so we can recognize them
+ 	# if they turn up in the bad batches
+ 	sed 's,.*n.*\.a\(.*\),touch &; mv & 6666\1,' $tmp | /bin/sh 
+ fi
  find . -type f -mtime +1 -print | sed 's;^\./;;' | egrep -v '^bad/' >$tmp
  if test -s $tmp		# old non-bad files lying about
  then

If you think the nspool.aXXXX bit is a bad idea leave the find
command as:
find . -name 'nntp.a*' -mtime +1 -print >$tmp
-- 
Simon J. Gerraty		<sjg@melb.bull.oz.au>

#include <disclaimer,_witty_comment>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads