rkt logo

INN FAQ Part 6

NOTE: The maintainers of the INN FAQ stopped publishing in December 1997.
An important update to this topic is provided by Mib Software in the Usenet RKT for Subscribers.

Subject: (6.3) Safe way to edit the "active" file?

First of all, you could manipulate the active file using the ctlinnd
"newgroup", "rmgroup" and "changegroup" commands. However, sometimes
you just need to do a lot of editing all at once:

The following sequence is the shortest:

	ctlinnd pause "edit active"
	[do something to the active file]
	ctlinnd reload active "edit active"
	ctlinnd go "edit active"

Simple! No need to "flush" since the "pause" does that.

> What if I need to delete 3000 lines from my active file?

I would definitely edit the active file manually (using
the above procedure).

> What if I need to delete 10 lines from my active file?

For a couple quick changes, I recommend using "ctlinnd". This is a
little slow because all channels are closed and reopened after each
"rmgroup", "newgroup", and "changegroup". However, it's easier than
remembering the above sequence.

is a bug in INN (all versions) that will shred your active file if you
do multiple "rmgroup" messages while the server if throttled. This is
a common mistake. People think the "rmgroup"'s will go faster if the
server is throttled. It will go faster, it will also shred your active

If you have a large number of groups to remove or create, you can use
awk to write a script to do the work for you.

	% cat thelist
	% awk <thelist '{ print "ctlinnd rmgroup " $1 }'
	ctlinnd rmgroup alt.foo.bar
	ctlinnd rmgroup alt.delete.me
	ctlinnd rmgroup comp.sys.mac

Now, you can either send the output of that to "| sh -x",
or you can redirect the output to a file, and "source" the

If you want to create a bunch of newsgroups, the awk
command might be like this:

	% awk <thelist \
	'{ print "ctlinnd newgroup " $1 " y user@host" }' | sh -x

Be aware that news.daily also throttles the server at some time so
verify the state of the server before doing ctlinnd {rm,new}group.


[Source: INN FAQ Part 6 Archive-name: usenet/software/inn-faq/part6]
[Last Changed: $Date: 1997/07/01 01:25:41 $ $Revision: 2.21 $]
[Copyright: 1997 Heiko Rupp, portions by Tom Limoncelli, Rich Salz, et al.]