[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page

Top Document: INN FAQ Part 6/9: Day-to-day operation and changes to the system
Previous Document: (6.2) Why is /usr/lib/news/newsgroups not found?
Next Document: (6.4) What's the best way to upgrade to a new version of INN?


(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]
	inncheck
	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.

DO NOT THROTTLE THE SERVER WHEN DOING MULTIPLE rmgroup COMMANDS.  There
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
file.

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
	alt.foo.bar
	alt.delete.me
	comp.sys.mac
	% 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
file.

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.



Top Document: INN FAQ Part 6/9: Day-to-day operation and changes to the system
Previous Document: (6.2) Why is /usr/lib/news/newsgroups not found?
Next Document: (6.4) What's the best way to upgrade to a new version of INN?

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
hwr@pilhuhn.de (Heiko W.Rupp)

Last Update December 05 2008 @ 00:13 AM

© 2008 FAQS.ORG. All rights reserved.