1DOCHECKGROUPS(8) InterNetNews Documentation DOCHECKGROUPS(8)
2
3
4
6 docheckgroups - Process checkgroups and output a list of changes
7
9 docheckgroups [-u] [include-pattern [exclude-pattern]]
10
12 docheckgroups is usually run by controlchan in order to process
13 checkgroups control messages. It reads a list of newsgroups along with
14 their descriptions on its standard input. That list should be
15 formatted like the newsgroups(5) file: each line contains the name of
16 a newsgroup followed by one or more tabulations and its description.
17
18 docheckgroups will only check the presence of newsgroups which match
19 include-pattern (an egrep expression like "^comp\..*$" for newsgroups
20 starting with "comp.") and which do not match exclude-pattern (also an
21 egrep expression) except for newsgroups mentioned in the
22 pathetc/localgroups file. This file is also formatted like the
23 newsgroups(5) file and should contain local newsgroups which would
24 otherwise be mentioned for removal. There is no need to put local
25 newsgroups of hierarchies for which no checkgroups control messages are
26 sent, unless you manually process checkgroups texts for them. Lines
27 beginning with a hash sign ("#") are not taken into account in this
28 file. All the newsgroups and descriptions mentioned in
29 pathetc/localgroups are appended to the processed checkgroups.
30
31 If exclude-pattern is given, include-pattern should also be given
32 before (you can use an empty string ("") if you want to include all the
33 newsgroups). Be that as it may, docheckgroups will only check
34 newsgroups in the top-level hierarchies which are present in the
35 checkgroups.
36
37 Then, docheckgroups checks the active and newsgroups files and displays
38 on its standard output a list of changes, if any. It does not change
39 anything by default; it only points out what should be changed:
40
41 • Newsgroups which should be removed (they are in the active file but
42 not in the checkgroups) and the relevant ctlinnd commands to achieve
43 that;
44
45 • Newsgroups which should be added (they are not in the active file but
46 in the checkgroups) and the relevant ctlinnd commands to achieve
47 that;
48
49 • Newsgroups which are incorrectly marked as moderated or unmoderated
50 (they are both in the active file and the checkgroups but their
51 status differs) and the relevant ctlinnd commands to fix that;
52
53 • Descriptions which should be removed (they are in the newsgroups file
54 but not in the checkgroups);
55
56 • Descriptions which should be added (they are not in the newsgroups
57 file but in the checkgroups).
58
59 The output of docheckgroups can be fed into mod-active (it will pause
60 the news server, update the active file accordingly, reload it and
61 resume the work of the news server) or into the shell (commands for
62 ctlinnd will be processed one by one). In order to update the
63 newsgroups file, the -u flag must be given to docheckgroups.
64
65 When processing a checkgroups manually, it is always advisable to first
66 check the raw output of docheckgroups. Then, if everything looks fine,
67 use mod-active and the -u flag.
68
70 -u If this flag is given, docheckgroups will update the newsgroups
71 file: it removes obsolete descriptions and adds new ones. It also
72 sorts this file alphabetically and improves its general format (see
73 newsgroups(5) for an explanation of the preferred number of
74 tabulations).
75
77 So as to better understand how docheckgroups works, here are examples
78 with the following active file:
79
80 a.first 0000000000 0000000001 y
81 a.second.announce 0000000000 0000000001 y
82 a.second.group 0000000000 0000000001 y
83 b.additional 0000000000 0000000001 y
84 b.third 0000000000 0000000001 y
85 c.fourth 0000000000 0000000001 y
86
87 the following newsgroups file (using tabulations):
88
89 a.first First group.
90 a.second.announce Announce group.
91 a.second.group Second group.
92 b.third Third group.
93 c.fourth Fourth group.
94
95 and the following localgroups file (using tabulations):
96
97 b.additional A local newsgroup I want to keep.
98
99 The checkgroups we process is in the file test which contains:
100
101 a.first First group.
102 a.second.announce Announce group. (Moderated)
103 a.second.group Second group.
104 b.third Third group.
105 c.fourth Fourth group.
106
107 If we run:
108
109 cat test | docheckgroups
110
111 docheckgroups will output that a.second.announce is incorrectly marked
112 as unmoderated and that its description is obsolete. Besides, two new
113 descriptions will be mentioned for addition (the new one for
114 a.second.announce and the missing description for b.additional -- it
115 should indeed be in the newsgroups file and not only in localgroups).
116 Now that we have checked the output of docheckgroups and that we agree
117 with the changes, we run it with the -u flag to update the newsgroups
118 file and we redirect the standard output to mod-active to update the
119 active file:
120
121 cat test | docheckgroups -u | mod-active
122
123 That's all!
124
125 Now, suppose we run:
126
127 cat test | docheckgroups "^c\..*$"
128
129 Nothing is output (indeed, everything is fine for the c.* hierarchy).
130 It would have been similar if the test file had only contained the
131 checkgroups for the c.* hierarchy (docheckgroups would not have checked
132 a.* and b.*, even if they had been in include-pattern).
133
134 In order to check both a.* and c.*, you can run:
135
136 cat test | docheckgroups "^a\..*$|^c\..*$"
137
138 And if you want to check a.* but not a.second.*, you can run:
139
140 cat test | docheckgroups "^a\..*$" "^a\.second\..*$"
141
142 In our example, docheckgroups will then mention a.second.announce and
143 a.second.group for removal since they are in the active file (the same
144 goes for their descriptions). Notwithstanding, if you do want to keep
145 a.second.announce, just add this group to localgroups and docheckgroups
146 will no longer mention it for removal.
147
149 pathbin/docheckgroups
150 The Shell script itself used to process checkgroups.
151
152 pathetc/localgroups
153 The list of local newsgroups along with their descriptions.
154
156 Documentation written by Julien Elie for InterNetNews.
157
158 $Id: docheckgroups.pod 8357 2009-02-27 17:56:00Z iulius $
159
161 active(5), controlchan(8), ctlinnd(8), mod-active(8), newsgroups(5).
162
163
164
165INN 2.6.4 2015-09-12 DOCHECKGROUPS(8)