ctlinnd renumber '' catch 22
Karl Kleinpaste
karl at charcoal.com
Fri Apr 20 13:10:04 UTC 2001
"David L. Nicol" <david at kasey.umkc.edu> writes:
> after renumbering, I still get SMstore: article already exists errors.
> ctlinnd renumber does _NOT_ set the high-water-mark according to what
> is in the directory.
You're right; it's renumbering according to the overviews, which
can lag the active file during normal operation, which in turn was
evidently the case when you crashed. The renumbering restart thus
makes hash out of what was a nearly-fine active file. This has been
discussed here before, several times.
The following icky shell script renumbers things the hard way. Shut
down INN cleanly, then run this as
fix-active < active > active.renumbered
and then move files around after it's done. It will take a while. (I
ought to perlify this, but I Don't Do Perl [much].) Finally, restart
INN so that it doesn't get the -r flag.
#!/bin/sh
cd /home/news/spool/articles
while read gr hi lo md
do
d="`echo $gr | tr . /`"
hi="`echo $hi | sed -e 's/^00*//'`"
lo="`echo $lo | sed -e 's/^00*//'`"
if [ "$hi" = '' ] ; then
hi=0
fi
if [ $hi -eq 0 -a $lo -eq 1 ] ; then
last=0
else
last="`/bin/ls -1 $d 2>/dev/null | sort -n | grep '^[1-9][0-9]*$' | tail -1`"
if [ "$last" = '' ] ; then
last=$hi
fi
fi
printf "%s %010d %010d %s\n" $gr $last $lo $md
done
exit 0
More information about the inn-workers
mailing list