bbanerje@sjuvax.UUCP (11/28/83)
I had formulated a similar request. Parsec!kolstad's
letter seemed to make this redundant. However, reading
it further, the letter seems to state that it will be
about 2 months before the process of collection and
editing are completed. I am therefore including the
text of my previous note (which I had composed about
a week ago but hadn't sent out). This should allow
better information than currently exists; and has the
advantage of immediacy. This could be a stopgap solution
until the edited connections database is available.
Enough said for now. The text of my letter follows.
Greetings to all and sundry,
{I'm including myself in the sundry}. I am the recipient of
Steve Bellovin's (ulysses!smb) pathalias program. The connec-
tions database seems out of date, and I would like to update it.
To this end I propose the resuscitation of net.adm.site .
This newsgroup already exists, although it's basically dormant
right now. Brad Templeton (watmath!bstempleton) set it up
in March 1982 to implement automatic Usenet directories. The
idea didn't catch on then; but I'm sure that its time has come.
I am including 2 shell scripts with this letter (unabashedly
filched from watmath!bstempleton). The first shell script is a
slimmed down version of his "siteform" script. This only prompts
you for a list of your public uucp connections in the format re-
quired by ulysses!smb 's cheapest path generator. The other in-
formation which was requested in the original script more or less
mirrors that available in the USENET maps posted every month.
The second script reads entries posted to net.adm.site. It takes
the system name off the article-id and creates an entry for that
site. The old entry for the site, if it exists is deleted.
I will be including a portion of the author's instructions for
installing the system shortly... wait do I hear objections?
1) We aren't running pathalias. -- It's in the public domain.
Send me a note ( by mail) and I'll send you a version (received
from Bill Sebok at astrovax -- hope that's Ok Bill!). This ver-
sion includes hooks into delivermail so that the routing database
is used for uucp mail. If you don't have delivermail, you can't
use these hooks; but you can still use the system to find the
shortest path. Also, if you have nmail or any other shortest
path software, the changes to adapt the received information
would probably be trivial.
2) Our uucp links are private. -- Ok no one is asking you to
divulge private information. However your news links are public
(Yes there are several awk scripts included with the distribu-
tion which extract connection info from the posted USENET maps).
At least you can indicate which of your news links are news only,
and which forward mail as well. That way the rest of us can
avoid bad paths.)
3) All this is too much trouble. -- Ok, you don't have to go
the whole hog if you don't want to. However, at least extract
the first script and post the information about your site. This
should take all of 5 minutes. It would allow the rest of us to
update our connections database.
In about a week, I'll post the entry for sjuvax. Hopefully
everyone else will do the same. That way everyone who wants it,
gets an up-to-date version of the adjacency list for the network.
The week's delay is so that everyone has time to set this up.
If you don't have net.adm.site at your site, either create it lo-
cally, or send me the info. by mail. I would be very grateful
for your time.
-- Binayak Banerjee { astrovax | bpa | burdvax }!sjuvax!bbanerje
What follows is an edited version of watmath!bstempleton's in-
stallation instructions. Also included are the shell scripts
which do the work.
... the shell scripts are simple and
easy to read if you want to know what is going on. The scripts
use A format so that both A and B news users can take advantage
of them. To install this at your site:
1) Put the 'siteform' shell script somewhere hand so that you can
execute it when you like. If you run B news, it is probably a
good idea to NOT have net.adm groups in your ngfile, but rather
manually, temporarily put them in when the time comes to make an
entry, to avoid accidental posting to these groups by other
users.
2) Put the 'recsite' shell script somewhere, and make it execut-
able. I suggest /usr/lib/news as a fine place for it, but any-
thing will do. (A sites don't have this directory, they can use
another)
3) If you like, make recsite run setuid to the newsuser (and set-
gid if you also desire) so that the usenet directory will not
have to be generally writable
4) Alter the variables in 'recsite' as you need regarding files
and directories to use. If you run A news, change the mentions
of inews -t to 'news -i' as you like.
5) add a line to your sys or .sys file to handle recsite. A typ-
ical line might be:
dummy:net.adm.site:A:/usr/lib/news/recsite
This depends on what directories you have used etc. Note also
that the name 'dummy' is just a dummy name that should not match
any existing or likely uucp system name.
You are now ready to go. ...........
Entries are put in the usenetdir file with each line prepended
with "sitename;" so you can conveniently grep for info on a given
site.
In addition, each entry contains a line called 'Best Path:'. You
will probably want to alter this line when a new site entry comes
in, since it will contain the rather roundabout USENET path.
This line can eventually be used for things such as aliasing pro-
grams or to answer the user's question: "How to I get to site X?"
Unfortunately, the Best Path part won't work if an ARPANET like
is used, as for site 'cca'. You'll have to manually alter this.
Eventually, best paths will be pulled out of the UUCP link en-
tries in your directory. *** NOTE *** This is redundant since we
are just building a database for pathalias to use. ( B. Baner-
jee).
There are further plans for net.adm.* These groups can be used
for all sorts of control messages that might also be read by hu-
mans unlike the net.*.ctl messages coming out in the B release of
netnews. It would be fairly simple to set up programs to create
a uucp 'phonebook' listing people on the USENET (net.adm.phone)
or a group in which newly created uucp links are declared if you
will allow public use on them. (thus the wonder programs to do
the graph theory on the net have a database to work on.)
If others have ideas - they can go ahead, all that need be done
is to write the code to enter items and the code to decode them.
Post the code to the net, with installation instructions, and
wait for acceptance. In about a week, assuming this idea is ac-
cepted, I will give the go-ahead for all sites to post their en-
tries. After this, every site that wants one will have an up to
date USENET directory in a standard form. Here is the shell
script for the reading program, called 'siteform'
-------------------------------------------------------------------
SITEGROUP=net.adm.site
echo "Give the institution type name of your site, ie. the name of your company?"
read name
echo Site: $name >$san
echo "Please give the network names of your USENET partners (the people in your"
echo "sys (or .sys) file (seperated by commas)"
read unpart
echo Usenet partners: $unpart >>$san
cat <<"blart"
Please give the network names of the sites that you talk to
on the uucp network. This information is desired for a database of UUCP
connections from which UUCP aliasing files can be built through a program
written by unc!smb. List each site to which you have a uucp connection
that you wish to make public. To list a site, give its UUCP name, followed
by a value describing how useful the connection is in parentheses. Your
cost can be given as a standard arithmetic expression. The lower the number,
the better the line is. The following 'manifests' are known to the program
with the following values: (If you don't give an expression, 3000 is default)
LOCAL = 10
ARPA = 31
DED = 95
DEDICATED = 95
DIRECT = 200
DEMAND = 300
DIAL = 300
DIALED = 300
HOURLY = 500
POLLED = 5000
DAILY = 5000
WEEKLY = 30000
DEAD = INF/2
HIGH = -5 /* baud rate bonus */
LOW = 5 /* baud rate penalty */
Delimit your entries with commas. Type as many lines as you like,
(naturally, don't put a comma after the last entry) and enter a null
line when you are done. Here is an example:
decvax(2*HOURLY), watcgl(DIRECT), watarts(DEMAND),
hcr(POLLED), cbosg(WEEKLY)
blart
while { read uupart; test -n "$uupart"; }
do echo Partners: $uupart >>$san
done
echo "Please enter any comments you might wish to add to your directory entry."
echo "You may want to describe what hardware you have, or just give additional"
echo "details regarding your site. Enter an EOF to indicate you are done"
while read cline
do echo Comment: $cline >>$san
done
echo "Here is your USENET directory entry. Enter a newline to send it off."
echo "Anything else will abort the sending and leave the entry in $san"
cat $san
read abrt
if test -z "$abrt"
then inews -n $SITEGROUP -t "sitedir \"$name\"" -q <$san
rm $san
else
echo "Your item is now in file $san"
echo "You may edit it, and post it with the command:"
echo "inews -n $SITEGROUP -t \"sitedir "$name"\" -q <$san"
echo "(* or mail it back to {astrovax|bpa|burdvax}!sjuvax!bbanerje"
echo "Thanks - Binayak *)"
fi
------------------------------------------------------------------------
Here is the decoding program, called 'recsite', to go in /usr/lib/news if
you desire. Note a temporary file is needed, you should define it as
you like.
-------------------------------------------------------------------------
DIRFILE=/usr/lib/news/usenetdir
DIRTEM=/usr/lib/news/dirtem
read site
site=`echo $site | sed -e 's/^A//' -e 's/\..*$//'`
read groups
read path
path=`echo $path | sed -e 's/^[^!:]*[!:]//' -e 's/[!:]*[^!:]*$//'`
read date
read title
if test ! -r $DIRFILE; then
touch $DIRTEM
else
sed -e "/^$site;/d" >$DIRTEM <$DIRFILE
fi
while read item; do
echo "$site;$item" >>$DIRTEM
done
echo "$site;Best Path: $path" >>$DIRTEM
mv $DIRTEM $DIRFILE
--------------------------------------------------------------
--
Binayak Banerjee
{astrovax | bpa | burdvax}!sjuvax!bbanerje