home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume19 / cnews2 / part02 < prev    next >
Encoding:
Internet Message Format  |  1989-06-29  |  36.9 KB

  1. Subject:  v19i079:  Cnews production release, Part02/19
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: utzoo!henry
  7. Posting-number: Volume 19, Issue 79
  8. Archive-name: cnews2/part02
  9.  
  10. [  The install.out file is not that big, and it contains some long lines
  11.    and embedded backspace characters.  It's here for convenience; shipping
  12.    formatted documents is not my standard practice.  --r$ ]
  13.  
  14. : ---CUT HERE---
  15. echo 'doc/install.out':
  16. sed 's/^X//' >'doc/install.out' <<'!'
  17. X
  18. X
  19. X
  20. X
  21. X
  22. X
  23. X
  24. X
  25. X
  26. X           IIIInnnnssssttttaaaalllllllliiiinnnngggg ````````CCCC NNNNeeeewwwwssss'''''''' NNNNeeeettttwwwwoooorrrrkkkk NNNNeeeewwwwssss SSSSooooffffttttwwwwaaaarrrreeee
  27. X
  28. X
  29. X                          Geoff Collyer
  30. X
  31. X                    Department of Statistics
  32. X                      University of Toronto
  33. X
  34. X
  35. X
  36. X
  37. X
  38. X
  39. X          This document describes the flow of  network  news
  40. X     within  and  between machines, what each component of C
  41. X     news does, and how to install C news.
  42. X
  43. X
  44. X
  45. XIIIInnnnttttrrrroooodddduuuuccccttttiiiioooonnnn
  46. X
  47. X     Network news (or _n_e_t_n_e_w_s for short) consists of a collection
  48. Xof  messages formatted similarly to ARPAnet mail (see ARPA Inter-
  49. Xnet RFC 1036 for details), widely spread.  The  logical  network,
  50. Ximposed on top of various real networks, formed by the set of all
  51. Xinterconnected sites exchanging network news is called ``Usenet''
  52. Xand was formed in 1979, radiating out from Duke University.  Net-
  53. Xnews is propagated between cooperating  machines  by  a  flooding
  54. Xalgorithm,  with  some  loop prevention heuristics:  each machine
  55. Xsends its neighbours news that the neighbours have (probably) not
  56. Xyet seen.
  57. X
  58. X     Flow of netnews between machines may be achieved by  use  of
  59. Xany  network  which can transmit an arbitrary stream of (at least
  60. X7-bit) ASCII code, unmodified.   If  a  network  cannot  transmit
  61. XASCII  intact  (e.g.  BITNET),  it  is possible to encode netnews
  62. Xbefore transmission across the network and decode it upon  recep-
  63. Xtion  from  the  network.  Since one cannot be certain that one's
  64. Xnetwork neighbours will be up and reachable at all times,  outgo-
  65. Xing netnews must be queued, at least in the case of network trou-
  66. Xble.  To date, at least these networks, protocols and media  have
  67. Xbeen used to transmit netnews correctly:  UUCP, RS232, NNTP, Eth-
  68. Xernet(Reg), the ARPA  Internet,  Datakit(Reg),  ACSnet,  magnetic
  69. Xtape, SMTP, and BITNET, though at least the last two require some
  70. Xform of encapsulation  to  avoid  corruption  of  articles;  SMTP
  71. Xbecause some common implementations get the newline-CRLF mappings
  72. Xwrong, thus throwing off  byte  counts  in  batches,  and  BITNET
  73. Xbecause  of its Procrustean chopping, expanding, mapping, bashing
  74. Xand smashing of all data sent through it (sending lines of 80  or
  75. Xfewer  characters  of  letters of either case and digits and plus
  76. Xand minus appears to be safe).
  77. X
  78. X
  79. X
  80. X
  81. X
  82. X
  83. X
  84. X
  85. X                              - 2 -
  86. X
  87. X
  88. X
  89. X     Netnews arrives via some network, which causes a command  to
  90. Xbe  executed  upon arrival (e.g.  _r_n_e_w_s).  _r_n_e_w_s typically spools
  91. Xthe inbound netnews  for  later  processing.   Eventually  (often
  92. Xwithin  the  hour  or  at the end of the business day), the input
  93. Xqueue is run and the netnews is stored locally,  typically  under
  94. X/_u_s_r/_s_p_o_o_l/_n_e_w_s,  and  queued  for transmission to netnews neigh-
  95. Xbours.  Once stored on disk, netnews may be read by any of a col-
  96. Xlection  of  unprivileged news readers, including _c_a_t(1).  _E_x_p_i_r_e
  97. Xis run typically each night to remove old netnews from disk.
  98. X
  99. X     C News was originally written to provide a much  faster  and
  100. Xsmaller, more robust, reliable and correct implementation of net-
  101. Xnews software than B 2.11 news.  We believe that C News  is  also
  102. Xfaster,  smaller and more robust than B 3.0 news.  B 3.0 news has
  103. Xmany more features; take that as you will.
  104. X
  105. XCCCC NNNNeeeewwwwssss CCCCoooommmmppppoooonnnneeeennnnttttssss....
  106. X
  107. X     _R_n_e_w_s invokes the input  subsystem,  which  spools  incoming
  108. Xnetnews   in   its  original  form,  as  received,  typically  in
  109. Xcompressed batches.  Periodically, the input queue should be  run
  110. Xby  invoking _n_e_w_s_r_u_n, thus uncompressing any compressed input and
  111. Xfeeding it to _r_e_l_a_y_n_e_w_s.
  112. X
  113. X     _R_e_l_a_y_n_e_w_s files incoming netnews as  articles  on  disk  and
  114. Xinitiates spooled transmission to other machines, often by simply
  115. Xwriting the names of the disk files containing  the  articles  on
  116. Xthe  ends  of `batch' files of file names.  Quite a bit of policy
  117. Xfrom RFC 1036 is embedded  in  _r_e_l_a_y_n_e_w_s.   _i_n_e_w_s  is  a  complex
  118. Xfront-end  for  _r_e_l_a_y_n_e_w_s  which  implements much of the per-site
  119. Xpolicy on news posting.  _i_n_e_w_s  is  a  fairly-slow  shell  script
  120. Xwhich  is  adequately fast for most sites, but it will need to be
  121. Xreplaced by something more streamlined for  sites  which  gateway
  122. Xmailing lists into netnews, for example.
  123. X
  124. X     The output _b_a_t_c_h_e_r reads lists of file names  and  generates
  125. Xnews  batches  (see  RFC  1036  or  _n_e_w_s(5)  for  the  format) of
  126. Xprescribed sizes and queues the batches for transmission to other
  127. Xsites.   The  batcher is run asynchronously with _r_e_l_a_y_n_e_w_s, typi-
  128. Xcally once an hour outside of business hours.
  129. X
  130. X     _E_x_p_i_r_e is generally run once per night to remove  from  disk
  131. Xnews  articles  older  than a few days.  _E_x_p_i_r_e can use different
  132. Xexpiry criterion for different newsgroups and can  archive  arti-
  133. Xcles  instead  of removing them.  _E_x_p_i_r_e also runs asynchronously
  134. Xwith _r_e_l_a_y_n_e_w_s.
  135. X
  136. X     There are many news readers.  C News comes  with  a  limited
  137. Xnews  reader  (_r_e_a_d_n_e_w_s  by Michael Rourke) sufficient to replace
  138. Xlong-winded /_e_t_c/_m_o_t_ds but you will want a heavy-duty news reader
  139. Xif you plan to read more than local news groups.  We recommend _r_n
  140. Xby Larry Wall, available from your  netnews  neighbours  or  your
  141. Xnearby ccccoooommmmpppp....ssssoooouuuurrrrcccceeeessss....uuuunnnniiiixxxx archive site.  There are others:  _v_n and
  142. X_v_n_e_w_s are two.
  143. X
  144. X
  145. X
  146. X
  147. X
  148. X
  149. X
  150. X
  151. X                              - 3 -
  152. X
  153. X
  154. X
  155. XPPPPrrrreeeeppppaaaarrrraaaattttiiiioooonnnn ffffoooorrrr IIIInnnnssssttttaaaallllllllaaaattttiiiioooonnnn
  156. X
  157. X     Netnews consumes a lot of disk space  and  often  a  lot  of
  158. Xtransmission time.  Here are some relevant measurements regarding
  159. Xa full netnews feed as of the time  of  writing  (January  1989),
  160. Xtaken  from  _n_e_w_s._l_i_s_t_s:   a day's netnews is about 3Mb and 1,400
  161. Xarticles in 450 newsgroups.  Years ago, sites often kept 14  days
  162. Xof netnews on disk, but now many sites keep news for 3 to 5 days,
  163. Xthus allowing for the occasional long weekend.  Thus a full  news
  164. Xfeed  expired  after 4 days will consume about 12Mb.  Some people
  165. Xfeel that news volume is doubling roughly every  16  months.   If
  166. Xthis  is true, we can expect volume to increase by a factor of 10
  167. Xin about 4 years to 30Mb per day or 115Mb for 4 days.  It is thus
  168. Xwise  planning  to  set  aside  a  lot of disk space for netnews.
  169. XThere are two ways to cope with ever-increasing volumes  of  net-
  170. Xnews:   refuse  to  accept  more newsgroups, or expire news after
  171. Xshorter intervals on disk.  A current full feed takes just over 7
  172. Xhours  to  transmit  at 1200 baud, so for dial-up connections one
  173. Xclearly wants the fastest modems one can afford.
  174. X
  175. X     Clearly, transmitting a full news feed is a non-trivial com-
  176. Xmitment  of resources, so you may have some difficulty in finding
  177. Xa site willing to supply one.  Such a site may in turn expect you
  178. Xto  feed yet other sites.  You will need to agree with your pros-
  179. Xpective netnews neighbour(s) upon transfer media,  protocols  and
  180. Xnetworks.
  181. X
  182. X     Before proceeding to install C News, you  should  read  this
  183. Xdocument through to the end, probably read the companion document
  184. X_T_h_e _I_n_t_e_r_f_a_c_e _B_e_t_w_e_e_n _C _N_e_w_s _A_n_d _T_h_e _O_u_t_s_i_d_e _W_o_r_l_d, and  possibly
  185. Xread  selected items in the _C _N_e_w_s _I_m_p_l_e_m_e_n_t_o_r'_s _N_o_t_e_b_o_o_k and the
  186. Xmanual pages.
  187. X
  188. X     You will need to assign a user id and group  id  to  netnews
  189. X(often  new  ids  called ``news''); initialise these directories:
  190. XNEWSCTL (typically  ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssss),  NEWSBIN  (////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssssbbbbiiiinnnn),
  191. Xand  NEWSARTS  (////uuuussssrrrr////ssssppppoooooooollll////nnnneeeewwwwssss);  and  install  each  subsystem.
  192. XNEWSCTL and NEWSARTS are logically one subtree, defining  a  news
  193. Xdata  base,  but  are split for backward compatibility with older
  194. Xnews software, particularly old news readers.   NEWSBIN  contains
  195. Xprograms and shell scripts which might be common amongst machines
  196. Xsharing a common architecture (e.g.  Sun  3's);  NEWSCTL////bbbbiiiinnnn  may
  197. Xoverride these.  The goal is to install the subsystems, integrate
  198. Xthem into a working news system, and configure the news system to
  199. Xcommunicate with other news systems.
  200. X
  201. X     There are a few key files that must exist before any serious
  202. Xattempt may be made to operate the news software.  NEWSCTL////aaaaccccttttiiiivvvveeee
  203. Xis the list of newsgroups that this site  knows  (is  willing  to
  204. Xaccept  or  individually  reject),  and must be owned by the NEWS
  205. Xuserid (the userid that owns  NEWSBIN////rrrreeeellllaaaayyyy////rrrreeeellllaaaayyyynnnneeeewwwwssss,  typically
  206. X_n_e_w_s).   You  will  probably want to get your initial aaaaccccttttiiiivvvveeee file
  207. Xfrom your upstream feed and edit it to suit the set of groups you
  208. Xwish to receive.  Be sure to make the second field more than five
  209. X
  210. X
  211. X
  212. X
  213. X
  214. X
  215. X
  216. X
  217. X                              - 4 -
  218. X
  219. X
  220. X
  221. Xdigits wide, by adding leading zeroes (ten digits is a  conserva-
  222. Xtive  width).   NEWSCTL////ssssyyyyssss defines the newsgroups that this site
  223. Xis willing to accept and describes how they are to  be  forwarded
  224. Xto  its neighbours.  NEWSCTL////sssseeeerrrrvvvveeeerrrr contains the hostname of your
  225. Xfile server, if you have multiple machines  sharing  news  via  a
  226. Xnetwork  file system.  NEWSCTL////wwwwhhhhooooaaaammmmiiii similarly contains the name
  227. Xby which a cluster of machines sharing news is to  be  known  for
  228. Xpurposes  of news.  NEWSCTL////mmmmaaaaiiiillllnnnnaaaammmmeeee is optional and contains the
  229. Xfull (possibly dotted) name by which your cluster  is  known  for
  230. Xpurposes  of mail.  NEWSCTL////oooorrrrggggaaaannnniiiissssaaaattttiiiioooonnnn (or NEWSCTL////oooorrrrggggaaaannnniiiizzzzaaaattttiiiioooonnnn
  231. Xif you insist) contains the name of your organisation, which will
  232. Xbe  copied  into  the  OOOOrrrrggggaaaannnniiiizzzzaaaattttiiiioooonnnn::::   header  of articles posted
  233. Xlocally, by default.  NEWSCTL////mmmmaaaaiiiillllppppaaaatttthhhhssss defines  mail  routes  to
  234. Xmachines  which  contain  aliases for postings to moderated news-
  235. Xgroups.     NEWSCTL////lllloooogggg,     NEWSCTL////eeeerrrrrrrrlllloooogggg,     NEWSCTL////hhhhiiiissssttttoooorrrryyyy,
  236. XNEWSCTL////hhhhiiiissssttttoooorrrryyyy....ddddiiiirrrr,  and  NEWSCTL////hhhhiiiissssttttoooorrrryyyy....ppppaaaagggg  must exist and be
  237. Xowned by the NEWS userid.  Tentative versions of all these  files
  238. Xare  built by the installation procedures, but it is quite likely
  239. Xthat you'll have to edit some of them.
  240. X
  241. XCCCC NNNNeeeewwwwssss IIIInnnnssssttttaaaallllllllaaaattttiiiioooonnnn
  242. X
  243. X     Proceed to the ccccoooonnnnffff directory of the distribution.  There is
  244. Xa  major  shell file here, named bbbbuuuuiiiilllldddd, that will interrogate you
  245. Xat length and construct shell files to do the real work.  You may
  246. Xneed  to do ``chmod +x build'' before running it, to make it exe-
  247. Xcutable.
  248. X
  249. X     You will probably need your  system's  manuals  on  hand  to
  250. Xanswer  bbbbuuuuiiiilllldddd's  questions.  Another terminal (or another window,
  251. Xon a bitmap  display)  would  also  be  useful.   You'd  best  be
  252. Xprepared  to take notes, also, as bbbbuuuuiiiilllldddd will occasionally suggest
  253. Xthat something be checked when you're done.
  254. X
  255. X     BBBBuuuuiiiilllldddd itself does not alter any files or perform any instal-
  256. Xlation  chores:   all  it  does is create shell files in the ccccoooonnnnffff
  257. Xdirectory.  If you already know something about news software, or
  258. Xare  merely  suspicious  that bbbbuuuuiiiilllldddd hasn't done everything right,
  259. Xyou should probably read the shell  files  before  running  them.
  260. XThere  are  four  of  them:   ddddooooiiiitttt....rrrrooooooootttt, ddddooooiiiitttt....bbbbiiiinnnn, ddddooooiiiitttt....nnnneeeewwwwssss, and
  261. Xaaaaggggaaaaiiiinnnn....rrrrooooooootttt.
  262. X
  263. X     DDDDooooiiiitttt....rrrrooooooootttt sets up the major directories for news,  and  sets
  264. Xtheir  ownerships correctly.  It typically will have to be run as
  265. X_r_o_o_t to have adequate permissions for all of this.  It is brief.
  266. X
  267. X     DDDDooooiiiitttt....bbbbiiiinnnn does most of the work of  building  and  installing
  268. Xthe  programs.  It should be run as the user who owns the distri-
  269. Xbution directories and will own  the  executable  programs  under
  270. XNEWSBIN.
  271. X
  272. X     DDDDooooiiiitttt....nnnneeeewwwwssss does some other small chores and installs  control
  273. Xfiles.   If  any of the control files already exist, it will com-
  274. Xplain and refuse to overwrite them, as a safety  precaution.   It
  275. X
  276. X
  277. X
  278. X
  279. X
  280. X
  281. X
  282. X
  283. X                              - 5 -
  284. X
  285. X
  286. X
  287. Xshould  be run as the owner of the news files.  Since many of the
  288. Xfiles it is installing are built by ddddooooiiiitttt....bbbbiiiinnnn, that should be  run
  289. Xfirst.
  290. X
  291. X     Finally,  aaaaggggaaaaiiiinnnn....rrrrooooooootttt  tends  to  ownership  and   permission
  292. Xchanges  on  a  few  programs  that  need  to run set-userid.  It
  293. Xrequires the ability to change ownerships and to set  permissions
  294. Xon  the files afterwards, which usually means running it as _r_o_o_t.
  295. XIt too is brief.
  296. X
  297. X     There are undoubtedly strange systems out there  that  bbbbuuuuiiiilllldddd
  298. Xand  friends are not smart enough to cope with.  In such cases it
  299. Xwill be necessary to edit the shell files before running them, or
  300. Xto  use  them  as guides and do the work by hand.  In particular,
  301. Xsystems that require strange options in MMMMaaaakkkkeeeeffffiiiilllleeees  will  need  to
  302. Xhave those inserted by hand.
  303. X
  304. X     If you want to test pieces  of  C  News  without  installing
  305. Xthem,  some (not all) of the subsystems have a ``make r'' feature
  306. Xthat runs a regression test.  Note:  almost all of these  require
  307. Xthat  NEWSCTL////bbbbiiiinnnn////ccccoooonnnnffffiiiigggg,  or  its  local equivalent, be in place
  308. Xalready so that shell files can find out what  PATH  (etc.)  they
  309. Xshould be using.
  310. X
  311. X     Note that it is easy to build a test news  system  which  is
  312. Xcompletely independent of other existing news systems on the same
  313. Xmachine, or to build one which shares its NEWSBIN with another  C
  314. Xnews  system,  or shares input of articles (e.g. running an old B
  315. Xnews system and a new C news system off the same stream of  input
  316. Xuntil  you are confident that your new C news system is operating
  317. Xto your satisfaction).  See _s_u_b_s_t(1) for the mechanism which per-
  318. Xmits  quickly  changing  all the places that know the location of
  319. XNEWSCTL////bbbbiiiinnnn////ccccoooonnnnffffiiiigggg....   After  that,  edit   this   news   system's
  320. XNEWSCTL////bbbbiiiinnnn////ccccoooonnnnffffiiiigggg  and  things  should  be  set  up for separate
  321. Xexistence.
  322. X
  323. XFFFFiiiirrrrsssstttt NNNNeeeewwwwssss
  324. X
  325. X     When you arrange to get a news feed from your neighbor,  you
  326. Xshould  also  ask  him to send you the current set of articles in
  327. Xthe newsgroup nnnneeeewwwwssss....aaaannnnnnnnoooouuuunnnncccceeee....nnnneeeewwwwuuuusssseeeerrrrssss.  Several of these are  very
  328. Ximportant reading for people who are new to the net.
  329. X
  330. XUUUUnnnnuuuussssuuuuaaaallll SSSSyyyysssstttteeeemmmmssss
  331. X
  332. X     We believe that C News runs fine on 16-bit machines, but  it
  333. Xhasn't  been  tested very thoroughly on them lately.  It will not
  334. Xperform quite as well with the more limited space.
  335. X
  336. X     Machines with very old compilers can be a  headache.   There
  337. Xare  some  hooks  in  hhhh////nnnneeeewwwwssss....hhhh  for  doing  without  ``void'' and
  338. X``unsigned long'', two particular problem areas, but they have to
  339. Xbe arranged manually; bbbbuuuuiiiilllldddd does not know about them.
  340. X
  341. X
  342. X
  343. X
  344. X
  345. X
  346. X
  347. X
  348. X
  349. X                              - 6 -
  350. X
  351. X
  352. X
  353. X     Some very old systems  cannot  do  _s_e_t_u_i_d(_g_e_t_e_u_i_d()),  which
  354. Xmakes  it impossible for a daemon to make directories and get the
  355. Xownership right.  We provide a small program, sssseeeettttnnnneeeewwwwssssiiiiddddssss, to  run
  356. Xsetuid-root.    RRRReeeellllaaaayyyynnnneeeewwwwssss  knows  about  it  and  invokes  it  if
  357. X_s_e_t_u_i_d(_g_e_t_e_u_i_d()) fails; it then sets permissions  correctly  and
  358. Xre-invokes  rrrreeeellllaaaayyyynnnneeeewwwwssss.   The  code is short enough to be read and
  359. Xunderstood in full, so that the suspicious  system  administrator
  360. Xcan  be  sure  that  this  setuid-root program is not going to do
  361. Xsomething awful.
  362. X
  363. X
  364. X
  365. X
  366. X
  367. X
  368. X
  369. X
  370. X
  371. X
  372. X
  373. X
  374. X
  375. X
  376. X
  377. X
  378. X
  379. X
  380. X
  381. X
  382. X
  383. X
  384. X
  385. X
  386. X
  387. X
  388. X
  389. X
  390. X
  391. X
  392. X
  393. X
  394. X
  395. X
  396. X
  397. X
  398. X
  399. X
  400. X
  401. X
  402. X
  403. X
  404. X
  405. X
  406. X
  407. X
  408. X
  409. X
  410. X
  411. X
  412. X
  413. !
  414. echo 'conf/proto.sh':
  415. sed 's/^X//' >'conf/proto.sh' <<'!'
  416. X#! /bin/sh
  417. X# namexxx - purposexxx
  418. X
  419. X# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  420. X. ${NEWSCONFIG-/usr/lib/news/bin/config}
  421. X
  422. XPATH=$NEWSCTL/bin:$NEWSBIN/xxx:$NEWSBIN:$NEWSPATH ; export PATH
  423. Xumask $NEWSUMASK
  424. !
  425. echo 'conf/doit.bin':
  426. sed 's/^X//' >'conf/doit.bin' <<'!'
  427. Xumask 002
  428. Xset -x
  429. X: setting up for substitutions
  430. Xcat >nsubstitutions <<'!'
  431. X# master substitutions file
  432. X#
  433. X# where the programs live (see also NEWSCONFIG)
  434. XNEWSBIN        /usr/lib/newsbin
  435. X# where the control files live
  436. XNEWSCTL        /usr/lib/news
  437. X# where the articles live
  438. XNEWSARTS    /usr/spool/news
  439. X# what PATH should be used for finding normal programs
  440. X# (things not in NEWSBIN, that is)
  441. XNEWSPATH    /bin:/usr/bin
  442. X# the umask under which files should be created
  443. XNEWSUMASK    002
  444. X# who to send mail to when there is trouble
  445. XNEWSMASTER    usenet
  446. X# configuration file that lets shell files pick up all of this
  447. XNEWSCONFIG    /usr/lib/news/bin/config
  448. X!
  449. Xif test -r substitutions && cmp -s nsubstitutions substitutions
  450. Xthen
  451. X    rm nsubstitutions
  452. Xelse
  453. X    mv nsubstitutions substitutions
  454. Xfi
  455. X: done
  456. X: building headers
  457. Xcd ..
  458. Xif test ! -d include
  459. Xthen
  460. X    mkdir include include/sys
  461. Xfi
  462. Xcd h
  463. Xrm -f nnewshsed
  464. Xecho "/NOSTOREVAL.*qqq/s;^;/* ;" >>nnewshsed
  465. Xecho "/SMALLMEM.*qqq/s;^;/* ;" >>nnewshsed
  466. Xif test -f newshsed && cmp -s nnewshsed newshsed
  467. Xthen
  468. X    rm -f nnewshsed
  469. Xelse
  470. X    mv nnewshsed newshsed
  471. Xfi
  472. Xmake all || exit 1
  473. Xcd ../hfake
  474. Xed - Makefile <<'!'
  475. X/NEEDED =/s~.*~NEEDED =  ../include/stdlib.h~
  476. Xw
  477. X!
  478. Xmake all || exit 1
  479. X: done
  480. X: making substitutions...
  481. Xcd ../conf
  482. X: make substs        not necessary, defaults used
  483. X: done
  484. X: making spacefor, queuelen, etc....
  485. Xrm -f spacefor queuelen hostname setnewsids
  486. Xmake spacefor.bsd
  487. Xcp spacefor.bsd spacefor
  488. Xmake queuelen.hdb
  489. Xcp queuelen.hdb queuelen
  490. X# ( echo '#! /bin/sh' ; echo 'echo utzoo' ) >hostname
  491. X: done
  492. X: making library...
  493. Xtouch ../ranlibed
  494. Xsleep 2
  495. Xfor dir in libbsd42 libbig libc libcnews libstdio
  496. Xdo
  497. X    cd ../$dir
  498. X    make u   || exit 1
  499. Xdone
  500. Xcd ../libfake
  501. Xed - Makefile <<'!'
  502. X/NEEDED =/s/.*/NEEDED =  ldiv.o/
  503. Xw
  504. X!
  505. Xmake u   || exit 1
  506. Xcd ../conf
  507. Xmake ../ranlibed
  508. X: library done
  509. X: testing libstdio
  510. Xcd ../libstdio
  511. Xmake trials   || exit 1
  512. X: done
  513. X: building programs
  514. Xcd ../conf
  515. Xfor dir in conf batch expire input relay misc rna
  516. Xdo
  517. X    cd ../$dir
  518. X    make all DBM=-ldbm  
  519. Xdone
  520. X: done
  521. X: building prototype control files
  522. Xcd ../conf
  523. Xrm -f active allowed errlog history history.pag history.dir localgroups log mailname mailpaths organization postdefltdist postdefltgroup replyusepath server sys whoami
  524. Xcp config.proto config
  525. Xecho 'utzoo.uucp' >mailname
  526. Xcat <<'!' >organization
  527. XU of Toronto Zoology
  528. X!
  529. Xecho 'henry' >allowed
  530. Xecho 'replies must use ! addresses' >replyusepath
  531. Xecho 'utzoo' >whoami
  532. Xecho 'general 00000 00000 y' >active
  533. Xecho 'news.announce.newusers 00000 00000 y' >>active
  534. X>errlog
  535. X>history
  536. X>history.pag
  537. X>history.dir
  538. Xecho 'general    general local news' >localgroups
  539. X>log
  540. Xecho 'all    uunet!%s' >mailpaths
  541. Xcp sys.proto sys
  542. Xcat >cron <<'!'
  543. X15 *    1-31 *    0-6    su news -c '/usr/lib/newsbin/input/newsrun'
  544. X30 8    1-31 *    1-5    su news -c '/usr/lib/newsbin/input/newsrunning off'
  545. X00 17    1-31 *    1-5    su news -c '/usr/lib/newsbin/input/newsrunning on'
  546. X40 *    1-31 *    0-6    su news -c '/usr/lib/newsbin/batch/sendbatches'
  547. X59 0    1-31 *    0-6    su news -c '/usr/lib/newsbin/expire/doexpire'
  548. X45 3    1-31 *    0-6    su news -c '/usr/lib/newsbin/expire/superkludge comp.mail.maps'
  549. X10 8    1-31 *    0-6    su news -c '/usr/lib/newsbin/maint/newsdaily'
  550. X00 5,13,21    1-31 *    0-6    su news -c '/usr/lib/newsbin/maint/newswatch'
  551. X!
  552. Xecho 'su news -c /usr/lib/newsbin/maint/newsboot' >rc
  553. X: done
  554. Xexit
  555. X: installing programs
  556. Xfor dir in conf batch expire input relay misc rna
  557. Xdo
  558. X    cd ../$dir
  559. X    make bininstall BIN=/bin RBIN=/usr/lib/uucp/bin DBM=-ldbm
  560. Xdone
  561. X: done
  562. X: installing manual pages
  563. Xcd ../man
  564. Xcp inews.1 /usr/man/man1/inews.1
  565. Xcp postnews.1 /usr/man/man1/postnews.1
  566. Xcp news.5 /usr/man/man5/news.5
  567. Xcp expire.8 /usr/man/man8/expire.8
  568. Xcp newsaux.8 /usr/man/man8/newsaux.8
  569. Xcp newsbatch.8 /usr/man/man8/newsbatch.8
  570. Xcp newsmail.8 /usr/man/man8/newsmail.8
  571. Xcp relaynews.8 /usr/man/man8/relaynews.8
  572. Xcp rnews.8 /usr/man/man8/rnews.8
  573. X: done
  574. !
  575. echo 'conf/Makefile':
  576. sed 's/^X//' >'conf/Makefile' <<'!'
  577. X# =()<NEWSARTS = @<NEWSARTS>@>()=
  578. XNEWSARTS = /usr/spool/news
  579. X# =()<NEWSBIN = @<NEWSBIN>@>()=
  580. XNEWSBIN = /usr/lib/newsbin
  581. X# =()<NEWSCTL = @<NEWSCTL>@>()=
  582. XNEWSCTL = /usr/lib/news
  583. X# workaround for System V make bug
  584. XSHELL = /bin/sh
  585. XNEWSUSER=news
  586. XNEWSGROUP=news
  587. XCOPTS = -O
  588. XCFLAGS = $(COPTS) -I../include '-DNEWSUSER="$(NEWSUSER)"' '-DNEWSGROUP="$(NEWSGROUP)"'
  589. XLIBS = ../libcnews.a
  590. XLIBDIRS = libbig libbsd42 libc libcnews libfake \
  591. X    libsmall libstdio libusg libv7 libv8
  592. XDIRS = batch conf expire h hfake input $(LIBDIRS) misc relay rna
  593. X
  594. XPGMS = spacefor queuelen
  595. X
  596. Xall:    $(PGMS)
  597. X
  598. Xbininstall:    $(PGMS)
  599. X    chmod +x $(PGMS)
  600. X    cp $(PGMS) $(NEWSBIN)
  601. X    -if test -r hostname ; then chmod +x hostname ; cp hostname $(NEWSBIN) ; fi
  602. X    : and build takes care of setnewsids if needed
  603. X
  604. Xnewsinstall:
  605. X    : build stuff does the real work
  606. X
  607. Xsubsts:    subst.hs subst.gc substitutions subst
  608. X    chmod +x subst
  609. X    : too late for h and hfake, include has already been built
  610. X    -egrep '^(h|hfake)/' subst.hs subst.gc >junk
  611. X    test ! -s junk
  612. X    rm -f junk
  613. X    ./subst -f substitutions `sed 's;^;../;' subst.hs subst.gc`
  614. X
  615. Xspacefors:    spacefor.sysv spacefor.v7 spacefor.sgi spacefor.bsd spacefor.null
  616. X
  617. Xspacefor.bsd:    spacefor.proto Makefile
  618. X    cp spacefor.proto $@
  619. X
  620. Xspacefor.v7:    spacefor.proto Makefile
  621. X    sed '/dfunit=/s/1024/512/;/nr = 2/s//nr = 1/;/nf = 4/s//nf = 2/;/stupid/d' spacefor.proto >$@
  622. X
  623. Xspacefor.sysv:    spacefor.proto Makefile
  624. X    sed '/dfunit=/s/1024/512/;/awk/s~|~| sed "s/.*:/: :/" |~;/nf = 4/s//nf = 3/;/stupid/s/4BSD/System V/' spacefor.proto >$@
  625. X
  626. Xspacefor.sgi:    spacefor.proto Makefile
  627. X    sed '/dfunit=/s/1024/512/;/nf = 4/s//nf = 5/;/stupid/s/4BSD/SGI/' spacefor.proto >$@
  628. X
  629. Xspacefor.null:    Makefile
  630. X    echo '#! /bin/sh' >$@
  631. X    echo 'echo 100' >>$@
  632. X
  633. Xqueuelen.hdb:
  634. X    : okay
  635. X
  636. Xqueuelen.sub:
  637. X    : okay
  638. X
  639. Xqueuelen.null:
  640. X    echo '#! /bin/sh' >$@
  641. X    echo 'echo 0' >>$@
  642. X
  643. Xsetnewsids:    setnewsids.o $(LIBS)
  644. X    $(CC) $(CFLAGS) setnewsids.o $(LIBS) -o $@
  645. X
  646. X../ranlibed:    ../libcnews.a
  647. X    ranlib ../libcnews.a
  648. X    touch ../ranlibed
  649. X
  650. Xclean:
  651. X    rm -f spacefor.sysv spacefor.v7 spacefor.null queuelen.null
  652. X    rm -f spacefor.sgi
  653. X    rm -f allowed config mailname organization server whoami hostname errlog
  654. X    rm -f substitutions history history.pag history.dir active localgroups
  655. X    rm -f log mailpaths sys cron rc setnewsids setnewsids.o spacefor.bsd
  656. X    rm -f replyusepath spacefor queuelen junk
  657. X
  658. Xgclean:    tidy
  659. X    rm -f ../libcnews.a ../ranlibed
  660. X    rm -rf ../include
  661. X
  662. Xtidy:
  663. X    for d in $(DIRS) ; do cd ../$$d ; make clean ; done
  664. X
  665. Xspotless:    gclean
  666. X    rm -f again.root doit.bin doit.news doit.root
  667. X
  668. Xlclean:
  669. X    rm -f ../ranlibed
  670. X    for d in $(LIBDIRS) ; do cd ../$$d ; make clean ; done
  671. !
  672. echo 'conf/subst':
  673. sed 's/^X//' >'conf/subst' <<'!'
  674. X#! /bin/sh
  675. X# subst - substitute strings into files, carefully
  676. X
  677. XPATH=/bin:/usr/bin ; export PATH
  678. X
  679. Xcase "$1"
  680. Xin
  681. X    -f)
  682. X    substs=$2
  683. X    shift ; shift
  684. X    ;;
  685. X
  686. X    *)
  687. X    echo "$0: no substitutions file given" >&2
  688. X    exit 2
  689. X    ;;
  690. Xesac
  691. X
  692. Xthem="`sed '/^#/d; s/^\\([^    ]*\\)        *\\([^    ]*\\)$/s#@<\\1>@#\\2#g/' $substs`"
  693. X
  694. Xfor f
  695. Xdo
  696. X    # first, figure out temporary names
  697. X    case "$f"
  698. X    in
  699. X        */*)
  700. X        file="`expr \"$f\" : '.*/\\([^/]*\\)'`"
  701. X        dir="`expr \"$f\" : '\\(.*\\)/[^/]*'`"
  702. X        new="$dir/n.$file"
  703. X        old="$dir/o.$file"
  704. X        ;;
  705. X
  706. X        *)
  707. X        new="n.$f"
  708. X        old="o.$f"
  709. X        ;;
  710. X    esac
  711. X    echo "$f:"
  712. X
  713. X    # test existences
  714. X    if test ! -f $f
  715. X    then
  716. X        echo "$0: cannot find \`$f'" >&2
  717. X        continue                # NOTE CONTINUE
  718. X    fi
  719. X    if test -r $new
  720. X    then
  721. X        echo "$0: $new exists, cannot proceed" >&2
  722. X        exit 1
  723. X    fi
  724. X    if test -r $old
  725. X    then
  726. X        echo "$0: $old exists, cannot proceed" >&2
  727. X        exit 1
  728. X    fi
  729. X    ( >$old >$new ) 2>/dev/null
  730. X    if test ! -w "$old" -o ! -w "$new"
  731. X    then
  732. X        rm -f $old $new
  733. X        echo "$0: cannot create temporaries $old $new" >&2
  734. X        exit 1
  735. X    fi
  736. X
  737. X    # generate the new version
  738. X    trap "rm -f $new; exit" 1 2 15
  739. X    sed "/=()<.*>()=/{
  740. X        h
  741. X        n
  742. X        g
  743. X        s/.*=()<//
  744. X        s/>()=.*//
  745. X        $them
  746. X    }" $f >$new
  747. X
  748. X    # substitute new for old
  749. X    trap "mv $old $f; exit" 1 2 15
  750. X    mv $f $old
  751. X    mv $new $f
  752. X
  753. X    # dispense with the old version
  754. X    trap "rm -f $old; exit" 1 2 15
  755. X    rm $old
  756. Xdone
  757. !
  758. echo 'conf/README':
  759. sed 's/^X//' >'conf/README' <<'!'
  760. XThis is C News master configuration stuff, including some auxiliary C News
  761. Xprograms that are quite likely to need site-specific customizing, and some
  762. Xodds and ends of maintenance stuff that didn't fit anywhere else.
  763. X
  764. XSubst may possibly be useful enough to deserve installation as a program
  765. Xin its own right, which is why a manual page is supplied.
  766. X
  767. X"build" is the all-singing-all-dancing interactive shell program that sets
  768. Xup a bunch of shell files for you to run to install everything.  "build"
  769. Xitself does not mess with anything, so it can be run without danger.
  770. X
  771. Xbuild    shell program to build shell files to build and install news
  772. Xconfig.proto    prototype configuration file for use by build
  773. Xnewslock.sh    template for how to do locking in shell files
  774. Xproto.sh    template for how to write a C News shell file
  775. Xquery    minor auxiliary to build
  776. Xqueuelen.hdb
  777. Xqueuelen.sub    versions of queuelen for different uucps
  778. Xspacefor.bsd    4.2BSD spacefor; Makefile knows how to build others from it
  779. Xsubst    substituter program used by build to configure C News
  780. Xsubst.1    manpage for subst
  781. Xsubst.gc
  782. Xsubst.hs    lists of files needing attention by subst
  783. Xsys.proto    prototype sys file for use by build
  784. !
  785. echo 'conf/subst.hs':
  786. sed 's/^X//' >'conf/subst.hs' <<'!'
  787. Xbatch/Makefile
  788. Xbatch/batchsplit
  789. Xbatch/compb
  790. Xbatch/compc7
  791. Xbatch/sendbatches
  792. Xconf/Makefile
  793. Xconf/config.proto
  794. Xconf/proto.sh
  795. Xconf/queuelen.hdb
  796. Xconf/queuelen.sub
  797. Xconf/spacefor.proto
  798. Xexpire/Makefile
  799. Xexpire/doexpire
  800. Xexpire/mkhistory
  801. Xexpire/superkludge
  802. Xexpire/upact
  803. Xinput/Makefile
  804. Xinput/newsrun
  805. Xinput/newsrunning
  806. Xinput/recenews
  807. Xinput/recpnews
  808. Xinput/rnews.batch
  809. Xlibc/standard.c
  810. Xlibcnews/config.c
  811. Xman/expire.8
  812. Xman/inews.1
  813. Xman/news.5
  814. Xman/newsaux.8
  815. Xman/newsbatch.8
  816. Xman/newsmail.8
  817. Xman/relaynews.8
  818. Xman/rnews.8
  819. Xmisc/Makefile
  820. Xmisc/newsboot
  821. Xmisc/newsdaily
  822. Xmisc/newshostname
  823. Xmisc/newswatch
  824. Xman/postnews.1
  825. Xmisc/addgroup
  826. Xmisc/delgroup
  827. Xmisc/locknews
  828. Xnotebook/config
  829. Xbatch/batchih
  830. !
  831. echo 'conf/subst.gc':
  832. sed 's/^X//' >'conf/subst.gc' <<'!'
  833. Xrelay/altctl/checkgroups.new
  834. Xrelay/altctl/rmgroup.auto
  835. Xrelay/aux/chamod
  836. Xrelay/aux/mailnews
  837. Xrelay/aux/mkpdir
  838. Xrelay/aux/newsreply
  839. Xrelay/ctl/checkgroups
  840. Xrelay/ctl/newgroup
  841. Xrelay/ctl/rmgroup
  842. Xrelay/ctl/sendsys
  843. Xrelay/ctl/senduuname
  844. Xrelay/ctl/version
  845. Xrelay/makefile
  846. Xrelay/sh/anne.jones
  847. Xrelay/sh/ctlrun
  848. Xrelay/sh/inews
  849. Xrna/makefile
  850. Xrelay/sh/postnews
  851. !
  852. echo 'conf/sys.proto':
  853. sed 's/^X//' >'conf/sys.proto' <<'!'
  854. X# line indicating what we are willing to receive; note local groups on end
  855. XME:comp,news,sci,rec,misc,soc,talk,to,can,ont,tor,ut
  856. X
  857. X# sample insignificant feed not using batching
  858. Xhuey:news.config,to.huey/all::uux - -r -gd huey!rnews
  859. X
  860. X# sample major batched feed, including (unnecessary) explicit file name
  861. Xdewey:comp,news,sci,rec,misc,soc,talk,to.dewey,can,ont,tor,ut/all:f:dewey/togo
  862. X
  863. X# sample long-haul feed; note no local groups
  864. Xdonald:comp,news,sci,rec,misc,soc,talk,to.donald/all:f:
  865. X
  866. X# sample local-postings-only feed direct to major site (gets them out fast)
  867. Xscrooge:comp,news,sci,rec,misc,soc,talk,to.scrooge/all:Lf:
  868. X
  869. X# sample ihave/sendme link
  870. X# Send ihave telling louie what we have -- batcher turns the batch into a
  871. X# giant control message and posts it to "to.louie".  (#1)
  872. Xlouie:rec.music.synth/all,!sendme,!ihave:I:louie.ihave/togo
  873. X# Send sendme in response to ihave from louie -- again, turned by batcher
  874. X# into giant control message posted to "to.louie".  (#3)
  875. Xlouie-send-ids:to.louie/ihave:I:louie.sendme/togo
  876. X# Transmit said giant control messages by normal batching.  (#2,#4)
  877. Xlouie-ctl:to.louie/all,!sendme,!ihave:f:louie/togo
  878. X# Send articles in response to sendme messages from louie. (#5)
  879. Xlouie-real:to.louie/sendme:f:louie/togo
  880. X# Actually the last two could be combined.
  881. !
  882. echo 'conf/queuelen.sub':
  883. sed 's/^X//' >'conf/queuelen.sub' <<'!'
  884. X#! /bin/sh
  885. X# Find size of current queue of news outbound to $1.  Old-uucp version.
  886. X
  887. X# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  888. X. ${NEWSCONFIG-/usr/lib/news/bin/config}
  889. X
  890. XPATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  891. Xumask $NEWSUMASK
  892. X
  893. Xcd /usr/spool/uucp
  894. Xgrade=d
  895. X
  896. Xcase "$1" in
  897. X?|??|???|????|?????|??????|???????)    site="$1" ;;
  898. X*)    site=`expr "$1" : '^\(.......\).*'`
  899. Xesac
  900. X
  901. Xif test -d C.
  902. Xthen
  903. X    cd C.
  904. X    ls | egrep "^C\.$site$grade....\$" | wc | awk '{print $1}'
  905. Xelse
  906. X    echo 0
  907. Xfi
  908. !
  909. echo 'conf/query':
  910. sed 's/^X//' >'conf/query' <<'!'
  911. X#! /bin/sh
  912. Xecho "$*" | tr -d '\012'    # echo -n, more or less portably
  913. !
  914. echo 'conf/subst.1':
  915. sed 's/^X//' >'conf/subst.1' <<'!'
  916. X.TH SUBST 1 local
  917. X.DA 21 Feb 1989
  918. X.SH NAME
  919. Xsubst \- substitute definitions into file(s)
  920. X.SH SYNOPSIS
  921. X.B subst
  922. X.B \-f
  923. Xsubstitutions
  924. Xvictim ...
  925. X.SH DESCRIPTION
  926. X.I Subst
  927. Xmakes substitutions into files, in a way that is suitable for customizing
  928. Xsoftware to local conditions.
  929. XEach
  930. X.I victim
  931. Xfile
  932. Xis altered according to the contents of
  933. Xthe
  934. X.I substitutions
  935. Xfile.
  936. X.PP
  937. XThe
  938. X.I substitutions
  939. Xfile contains one line per substitution.
  940. XA line consists of two fields separated by one or more tabs.
  941. XThe first field is the \fIname\fR of the substitution, the second
  942. Xis the \fIvalue\fR.
  943. XNeither should contain the character `#'.
  944. XA line starting with `#' is a comment and is ignored.
  945. X.PP
  946. XIn the \fIvictim\fRs,
  947. Xeach line on which a substitution is to be made
  948. X(a \fItarget\fR line)
  949. Xmust be preceded by a
  950. X\fIprototype\fR line.
  951. XThe prototype line should be delimited in such a way that it will be
  952. Xtaken as a comment by whatever program processes the file later.
  953. XThe prototype line must contain a ``prototype'' of the target line bracketed
  954. Xby `=()<' and `>()=';
  955. Xeverything else on the prototype line is ignored.
  956. X.I Subst
  957. Xextracts the prototype, changes all instances of substitution names
  958. Xbracketed by `@<' and `>@' to their values,
  959. Xand then replaces the target line with the result.
  960. X.SH EXAMPLE
  961. X.PP
  962. XIf the \fIsubstitutions\fR file is
  963. X.PP
  964. X.RS
  965. X.nf
  966. X.ta \w'SECOND'u+4n
  967. XFIRST    111
  968. XSECOND    222
  969. X.fi
  970. X.RE
  971. X.PP
  972. Xand the \fIvictim\fR file is
  973. X.PP
  974. X.RS
  975. X.nf
  976. Xx = 2;
  977. X/* =()<y = @<FIRST>@ + @<SECOND>@;>()= */
  978. Xy = 88 + 99;
  979. Xz = 5;
  980. X.fi
  981. X.RE
  982. X.PP
  983. Xthen ``\fBsubst \-f \fIsubstitutions victim\fR'' changes \fIvictim\fR to:
  984. X.PP
  985. X.RS
  986. X.nf
  987. Xx = 2;
  988. X/* =()<y = @<FIRST>@ + @<SECOND>@;>()= */
  989. Xy = 111 + 222;
  990. Xz = 5;
  991. X.fi
  992. X.RE
  993. X.SH FILES
  994. X.ta \w'n.\fIvictim\fR'u+4n
  995. Xn.\fIvictim\fR    new version being built
  996. X.br
  997. Xo.\fIvictim\fR    old version during renaming
  998. X.SH SEE ALSO
  999. Xsed(1)
  1000. X.SH DIAGNOSTICS
  1001. XComplains and halts if it is unable to create its temporary files
  1002. Xor if they already exist.
  1003. X.SH HISTORY
  1004. XWritten at U of Toronto by Henry Spencer.
  1005. X.SH BUGS
  1006. XWhen creating a file to be \fIsubst\fRed, it's easy to forget to insert
  1007. Xa dummy target line after a prototype line;
  1008. Xif you forget, \fIsubst\fR ends up deleting whichever line did in fact
  1009. Xfollow the prototype line.
  1010. !
  1011. echo 'conf/doit.root':
  1012. sed 's/^X//' >'conf/doit.root' <<'!'
  1013. Xumask 002
  1014. Xset -x
  1015. X: making directories...
  1016. Xfor d in /usr/spool/news /usr/spool/news/in.coming /usr/spool/news/in.coming/bad /usr/spool/news/out.going /usr/lib/news /usr/lib/news/bin /usr/lib/newsbin
  1017. Xdo
  1018. X    if test ! -d $d
  1019. X    then
  1020. X        mkdir $d
  1021. X    fi
  1022. Xdone
  1023. X/etc/chown news.news /usr/spool/news /usr/spool/news/in.coming /usr/spool/news/in.coming/bad /usr/spool/news/out.going /usr/lib/news /usr/lib/news/bin
  1024. X/etc/chown bin.bin /usr/lib/newsbin
  1025. X: done
  1026. !
  1027. echo 'conf/doit.news':
  1028. sed 's/^X//' >'conf/doit.news' <<'!'
  1029. Xumask 002
  1030. Xset -x
  1031. X: installing programs
  1032. Xfor dir in conf batch expire input relay misc rna
  1033. Xdo
  1034. X    cd ../$dir
  1035. X    make newsinstall BIN=/bin RBIN=/usr/lib/uucp/bin DBM=-ldbm
  1036. Xdone
  1037. X: done
  1038. X: installing control files
  1039. Xcd ../conf
  1040. Xfor f in active allowed errlog history history.pag history.dir localgroups log mailname mailpaths organization postdefltdist postdefltgroup replyusepath server sys whoami
  1041. Xdo
  1042. X    if test -r /usr/lib/news/$f
  1043. X    then
  1044. X        echo "/usr/lib/news/$f already exists; left unchanged"
  1045. X    elif test ! -r $f
  1046. X    then
  1047. X        : "$f" not wanted
  1048. X    else
  1049. X        cp $f /usr/lib/news/$f
  1050. X    fi
  1051. Xdone
  1052. Xif test -r /usr/lib/news/bin/config
  1053. Xthen
  1054. X    echo '/usr/lib/news/bin/config already exists; left unchanged'
  1055. Xelse
  1056. X    cp config /usr/lib/news/bin/config
  1057. X    chmod +x /usr/lib/news/bin/config
  1058. Xfi
  1059. X: It is virtually certain that some of those control files
  1060. X: need modifying to suit your system.  In particular, you
  1061. X: should pick up a current 'active' file from your neighbors.
  1062. X: done
  1063. !
  1064. echo 'conf/again.root':
  1065. sed 's/^X//' >'conf/again.root' <<'!'
  1066. Xumask 002
  1067. Xset -x
  1068. X: setting uids for setuid programs...
  1069. X/etc/chown news.news /usr/lib/newsbin/input/newsspool /usr/lib/newsbin/relay/relaynews
  1070. Xchmod u+s,g+s /usr/lib/newsbin/input/newsspool /usr/lib/newsbin/relay/relaynews
  1071. X: done
  1072. !
  1073. echo 'conf/queuelen.hdb':
  1074. sed 's/^X//' >'conf/queuelen.hdb' <<'!'
  1075. X#! /bin/sh
  1076. X# Find size of current queue of news outbound to $1.  HDB/BNU version.
  1077. X
  1078. X# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  1079. X. ${NEWSCONFIG-/usr/lib/news/bin/config}
  1080. X
  1081. XPATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
  1082. Xumask $NEWSUMASK
  1083. X
  1084. Xcd /usr/spool/uucp
  1085. Xgrade=d
  1086. X
  1087. Xif test -d $1
  1088. Xthen
  1089. X    cd $1
  1090. X    ls | egrep "^C\..*$grade....\$" | wc | awk '{print $1}'
  1091. Xelse
  1092. X    echo 0
  1093. Xfi
  1094. !
  1095. echo 'conf/newslock.sh':
  1096. sed 's/^X//' >'conf/newslock.sh' <<'!'
  1097. Xlock="$NEWSCTL/LOCKxxx"        # modify name as appropriate
  1098. Xltemp="$NEWSCTL/L.$$"
  1099. Xecho $$ >$ltemp
  1100. Xtrap "rm -f $ltemp ; exit 0" 0 1 2 15
  1101. Xwhile true
  1102. Xdo
  1103. X    if newslock $ltemp $lock
  1104. X    then
  1105. X        trap "rm -f $ltemp $lock ; exit 0" 0 1 2 15
  1106. X        break
  1107. X    fi
  1108. X    sleep 30
  1109. Xdone
  1110. !
  1111. echo 'conf/config.proto':
  1112. sed 's/^X//' >'conf/config.proto' <<'!'
  1113. X# configuration -- all the shell files pick this up using "."
  1114. X# this makes it possible to add new variables here and have them
  1115. X#  available everywhere immediately
  1116. X#
  1117. X# =()<NEWSCTL=${NEWSCTL-@<NEWSCTL>@}>()=
  1118. XNEWSCTL=${NEWSCTL-/usr/lib/news}
  1119. X# =()<NEWSBIN=${NEWSBIN-@<NEWSBIN>@}>()=
  1120. XNEWSBIN=${NEWSBIN-/usr/lib/newsbin}
  1121. X# =()<NEWSARTS=${NEWSARTS-@<NEWSARTS>@}>()=
  1122. XNEWSARTS=${NEWSARTS-/usr/spool/news}
  1123. X# =()<NEWSPATH=${NEWSPATH-@<NEWSPATH>@}>()=
  1124. XNEWSPATH=${NEWSPATH-/bin:/usr/bin}
  1125. X# =()<NEWSUMASK=${NEWSUMASK-@<NEWSUMASK>@}>()=
  1126. XNEWSUMASK=${NEWSUMASK-002}
  1127. X# =()<NEWSMASTER=${NEWSMASTER-@<NEWSMASTER>@}>()=
  1128. XNEWSMASTER=${NEWSMASTER-usenet}
  1129. X# =()<NEWSCONFIG=${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  1130. XNEWSCONFIG=${NEWSCONFIG-/usr/lib/news/bin/config}
  1131. !
  1132. echo done
  1133.  
  1134.  
  1135.