|
|
1.1 root 1: From mark ...
2:
3: This package of two shell scripts allows you to send outgoing news in batches
4: rather than as it comes through. By controlling the batches, you can
5: implement a policy such as "mail goes through at once, but news only
6: goes out during non-working hours". The disadvantage is that news takes
7: longer to propagate, so unless you have system load or phone bill problems,
8: you probably don't want to use this.
9:
10: Basically, there are two shell scripts. /usr/lib/news/spoolnews <system>
11: will copy stdin out to a spool directory. /usr/lib/news/sendspoolednews
12: is run from cron periodically, and will uux all news which has been
13: spooled, then start a single uucico. If you run over a different network,
14: you can make suitable mods.
15:
16: To install: mkdir /usr/spool/outnews. For each system you spool news
17: to, mkdir a subdirectory with that name. The subdirectories should be
18: mode 777 unless you want to deal with protection issues, which I haven't
19: bothered with.
20:
21: Now edit your sys file, changing, say
22: foo:net.all,fa.all,to.foo::
23: to
24: foo:net.all,fa.all,to.foo::/usr/lib/news/spoolnews foo
25: Install the two shell scripts (mode 755) in /usr/lib/news.
26:
27: Add a line to /usr/lib/crontab such as
28: 0 0,2,4,6,8,12,17,19,21 * * * /usr/lib/news/sendspoolednews
29: to send outgoing news at the given times of the day. If you want
30: it to go every hour, make the 2nd field just "*". The above entry
31: will send news every two hours during unloaded times of a typical
32: working day - adjust it as you see fit locally. A line for a system
33: with phone bill problems might look like
34: 0 0,1,2,3,4,5,6,7,23 * * * /usr/lib/news/sendspoolednews
35: --- spoolnews
36: : ' spoolnews system : spool outgoing news to be transmitted to system '
37: S=/usr/spool/outnews
38: cat > $S/$1/$$
39: --- sendspoolednews
40: : ' sendspoolednews : transmit news which has been spooled'
41: S=/usr/spool/outnews
42: cd $S
43: for sys in *
44: do
45: cd $sys
46: for file in `ls -rt`
47: do
48: uux -z -r - $sys!rnews < $file
49: rm -f $file
50: done
51: cd ..
52: done
53: /usr/lib/uucp/uucico -r1 &
54: --- end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.