\section{Net News}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
stolen from wesommer's email message... needs to be cleaned up and put
above the line...

Some people on this list seem to be under the impression that the best
way to recover from one broken line in a history file is to run
"mkhistory".  This is wrong.

DO NOT USE mkhistory unless you screw up the history file irrevokably
(the disks are full and you can't find any free space).

mkhistory causes the system to "forget" all of the "recent"
messageid's its seen (except for the ones in unexpired articles in
/usr/spool/news), leading to all sorts of carnage and retransmissions.

Here's what you do:

1) log in as, or su to, the "news" user.

Doing maintainance as root can screw up the news system (because you
might leave things such that "news" can't write to them any more).

2) stop the processing of incoming news:
	touch /usr/spool/news/in.coming/stop

Wait for all relaynews processes to go away.

3) run "locknews" (/usr/lib/newsbin/maint/locknews).

This should print "news system locked by you", and start a new
subshell.

4) edit /usr/lib/news/history to remove the bad line(s).

Do not edit the file "in place"; edit a copy.

As it may be bigger than even emacs can deal with, you may have to
"split" it and then "cat" the split sections back together when you're
done.

When you're done, put the "fixed" copy in "history.n"

5) run mkdbm to reconstruct the index.

cd /usr/lib/news; mkdbm history.n

This may take a while.

6) save the old history file, just in case:

cp history /usr/spool/news/history.o
mv history.n history && \
	mv history.n.dir history.dir &&  \
	mv history.n.pag history.pag

7) exit from the shell pushed by locknews.

"news system now unlocked"

						- Bill
