[news.software.b] Run on batches - sendbatch fix

sl@van-bc.UUCP (Stuart Lynne) (03/20/87)

One minor problem that I've experienced with sendbatch is a tendency to
never stop once started, if news is being unbatched. This is because it is
faster to batch than unbatch. So it first catches up by batching all of the
files in the batch file. By this time news has unpacked somemore so it goes
ahead and batches them up. Of course by this time news has unpacked one or
two more so it dutifully batches them ......

The end result is a couple of big batch files, and a pack of small ones
filling up your spool directory.

The following patch to sendbatch will keep it from batching anything more
than the first file. It will wait for the next invocation to get the rest.
This was just a quick fix probably there are more intelligent ways to do
it.


44c44,46
< 	while test $? -eq 0 -a \( -s /usr/spool/batch/$rmt -o -s /usr/spool/batch/$rmt.work -o  \( -n "$DOIHAVE" -a -s /usr/spool/batch/$rmt.ihave \) \)
---
> 	testit="-s /usr/spool/batch/$rmt -o "
> 	#while test $? -eq 0 -a \( -s /usr/spool/batch/$rmt -o -s /usr/spool/batch/$rmt.work -o  \( -n "$DOIHAVE" -a -s /usr/spool/batch/$rmt.ihave \) \)
> 	while test $? -eq 0 -a \( $testit -s /usr/spool/batch/$rmt.work -o  \( -n "$DOIHAVE" -a -s /usr/spool/batch/$rmt.ihave \) \)
45a48
> 		testit=


Have fun!

-- 
Stuart Lynne	ihnp4!alberta!ubc-vision!van-bc!sl     Vancouver,BC,604-937-7532