home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff319.lzh
/
CNewsSrc
/
cnews.src.lzh
/
input
/
rnews.batch
< prev
next >
Wrap
Text File
|
1980-01-01
|
1KB
|
42 lines
#! /bin/sh
# Incoming-news spooling.
# We ignore arguments -- it looks tempting to put "$*" after cat and
# newsspool, but there are security problems.
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/lib/news/bin/config}
PATH=$NEWSCTL/bin:$NEWSBIN/input:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK
# check space, assuming a pretty large batch (no cheap way to find real size)
counter=1
while test " `spacefor 250000 incoming`" -le 0
do
sleep 300
if test " $counter" -gt 1111 # four tries is plenty
then
# oh no! -- nothing we can do, really...
cat >/dev/null
echo incoming news discarded due to space shortage |
mail "$NEWSMASTER"
exit 1
fi
counter="1$counter"
done
if newsspool >/tmp/ngripe.$$ 2>&1 # qqq (marker for Makefile)
then
rm -f /tmp/ngripe.$$
exit 0
else
# there really isn't any way to save the data if newsspool fails,
# not without causing other problems
(
echo newsspool failed!!!
cat /tmp/ngripe.$$
) | mail "$NEWSMASTER"
rm -f /tmp/ngripe.$$
exit 1
fi