[net.sources] Suns & News

jerry@oliveb.UUCP (Jerry Aguirre) (11/01/86)

We have a similar setup here.  News exists on one machine (oliveb) and
the others access it via RFS (a public domain network file system).
Our first attempt at allowing posting consisted of modifying the
postnews script to use "rsh" to run the inews on the machine containing
the news.  This resulted in problems for users without accounts on the
news machine.  It could probably have been fixed but didn't seem the
right way to go.

The second alternative is to use the NNTP software distributed with
4.3BSD.  It includes a version of "rn" that allows reading news across
the net without benefit of remote (network) file systems.  I plan to
try this out but it does not address the problem of users who use their
own news reader("vn").

What I have currently done is to modify the news software to contain a
"fixed" host name.  Thus all machines think that they are the news host
for purposes of news processing.  This has been working great for some
time now though "rn" will sometimes get confused if the news host goes
down while people are reading news.

Before somebody screams about a built in name making the code
unportable, remember that for my purposes the code is portable.  All 5
machines run the same inews.  (Not the same version, not exact copies,
but the SAME file.)

Here are the changes I have:

-----First in your localize.sh for defs.h add the following-------
-----Change news-host-name to the UUCP name of the news server ---
/\/\* #define GHNAME/a
#define HNAME "news-host-name"
.
p
-----Then make the following change to uname.c-----
*** uname.c.orig	Fri Mar  8 13:57:43 1985
--- uname.c	Mon Sep 15 10:59:09 1986
***************
*** 13,18
  
  #include "params.h"
  
  #ifdef UNAME
  # define DONE
  #endif

--- 13,28 -----
  
  #include "params.h"
  
+ #ifdef HNAME
+ /* use a fixed hostname, usefull when sharing news via network file system */
+ uname(uptr)
+     struct utsname *uptr;
+ {
+ 	strncpy(uptr->nodename, HNAME, sizeof (uptr->nodename));
+ }
+ # define DONE
+ #endif HNAME
+ 
  #ifdef UNAME
  # define DONE
  #endif