|
|
1.1 ! root 1: From cbosg!decvax!watmath!bstempleton Tue Mar 2 20:01:49 1982 ! 2: Date: Mon Mar 1 19:37:04 1982 ! 3: From: cbosg!decvax!watmath!bstempleton ! 4: Subject: net.adm.site stuff ! 5: Via: cbosgd.uucp (V3.73 [1/5/82]); 2-Mar-82 20:01:48-EST (Tue) ! 6: Mail-From: cbosg received by cbosgd at 2-Mar-82 20:01:45-EST (Tue) ! 7: To: decvax!cbosg!cbosgd!mark decvax!duke!unc!smb decvax!ittvax!swatt ! 8: decvax!shannon decvax!ucbvax!ARPAVAX:glickman watarts!eric ! 9: ::::::::::::::::::::::::::::::::::::::::::::::::::: ! 10: OK, here goes - a new idea for automating some of the work done by news ! 11: administrators on the USENET. ! 12: ! 13: I propose the setting up of a set of control newsgroups called net.adm.*, which ! 14: will primarily be for computer rather than human consumption. Messages posted ! 15: to these groups will all be fed by lines in the SYS file into programs that ! 16: interpret them, as well as forwarding them to other systems. ! 17: ! 18: The first of these programs I include below. It is for a group to be called ! 19: net.adm.site, and implements automatic USENET directories. There are two ! 20: programs. One prompts a news administrator for information concerning his ! 21: site, and builds a file of it. This file is posted to net.adm.site. ! 22: One of the things the script asks for is a list of your uucp connections ! 23: in the format required by unc!smb's cheapest path uucp alias generator. ! 24: If all sites provide the public paths they have, this will allow the ! 25: generator to produce the best routings, saving everybody money and phone time. ! 26: ! 27: The second file reads articles posted to net.adm.site. It takes the system ! 28: name off the article-id and creates an entry for that site. Included in ! 29: that entry is a path to that site derived from the 'from' line in the ! 30: header. This article is appended to the USENET directory file, in this ! 31: case called /usr/lib/news/usenetdir, and deletes the old entry for that ! 32: site. If you want it to put the entry in a private one file per site ! 33: directory, the change is fairly obvious. ! 34: ! 35: This is a simple description, but the shell scripts are simple and easy to ! 36: read if you want to know what is going on. The scripts use A format so ! 37: that both A and B news users can take advantage of them. To install this ! 38: at your site: ! 39: ! 40: 1) Put the 'siteform' shell script somewhere hand so that you can execute ! 41: it when you like. If you run B news, it is probably a good idea to NOT ! 42: have net.adm groups in your ngfile, but rather manually, temporarily put ! 43: them in when the time comes to make an entry, to avoid accidental posting ! 44: to these groups by other users. ! 45: ! 46: 2) Put the 'recsite' shell script somewhere, and make it executable. I ! 47: suggest /usr/lib/news as a fine place for it, but anything will do. ! 48: (A sites don't have this directory, they can use another) ! 49: ! 50: 3) If you like, make recsite run setuid to the newsuser (and setgid if you ! 51: also desire) so that the usenet directory will not have to be generally ! 52: writable ! 53: ! 54: 4) Alter the variables in 'recsite' as you need regarding files and ! 55: directories to use. If you run A news, change the mentions of inews -t ! 56: to 'news -i' as you like. ! 57: ! 58: 5) add a line to your sys or .sys file to handle recsite. A typical line ! 59: might be: ! 60: ! 61: siterec:net.adm.site:A:/usr/lib/news/recsite ! 62: ! 63: This depends on what directories you have used etc. ! 64: Note also that the name 'siterec' is just a dummy name that should not ! 65: match any existing or likely uucp system name. ! 66: ! 67: You are now ready to go. I will be posting the watmath entry in a short ! 68: time. Entries are put in the usenetdir file with each line prepended with ! 69: "sitename;" so you can conveniently grep for info on a given site. ! 70: ! 71: In addition, each entry contains a line called 'Best Path:'. You will probably ! 72: want to alter this line when a new site entry comes in, since it will contain ! 73: the rather roundabout USENET path. This line can eventually be used for ! 74: things such as aliasing programs or to answer the user's question: ! 75: "How to I get to site X?" ! 76: Unfortunately, the Best Path part won't work if an ARPANET like is used, ! 77: as for site 'cca'. You'll have to manually alter this. ! 78: Eventually, best paths will be pulled out of the UUCP link entries in your ! 79: directory. ! 80: ! 81: There are further plans for net.adm.* These groups can be used for all ! 82: sorts of control messages that might also be read by humans unlike the ! 83: net.*.ctl messages coming out in the B release of netnews. It would ! 84: be fairly simple to set up programs to create a uucp 'phonebook' listing ! 85: people on the USENET (net.adm.phone) or a group in which newly created ! 86: uucp links are declared if you will allow public use on them. ! 87: (thus the wonder programs to do the graph theory on the net have a database ! 88: to work on.) ! 89: ! 90: If others have ideas - they can go ahead, all that need be done is to write ! 91: the code to enter items and the code to decode them. Post the code to the ! 92: net, with installation instructions, and wait for acceptance. In about ! 93: a week, assuming this idea is accepted, I will give the go-ahead for all ! 94: sites to post their entries. After this, every site that wants one will have ! 95: an up to date USENET directory in a standard form. ! 96: ! 97: Some further notes on installation: ! 98: ! 99: 1) You may desire to make it possible for users to subscribe to and read this ! 100: newsgroup. If you don't, and run B news there are a few ways you can stop the ! 101: articles from being posted. The first is the built in RESTRICT feature of B ! 102: news that lets you exclude newsgroups. Normally this is not turned on. The ! 103: second is a kludge involving chown. Allow the newsgroup net.adm.site (and ! 104: other net.adm.* groups as they come along) to be created. Once it is created, ! 105: chown the directory in which it lives to some user other than the newsuser. ! 106: (you will probably wish to chgrp it as well). Once this is done, attempts ! 107: to write into the directory by the news program, which is setuid, will fail ! 108: because of permissions denied. As far as I can tell, news just handles this ! 109: quietly and the article is not written. It is still forwarded however, which ! 110: is important. ! 111: ! 112: 2) The new release of B news involves control messages of the form all.all.ctl, ! 113: which are never put in files on the local system - just interpreted by special ! 114: case code. It is possible that once these are fully implemented that automatic ! 115: directory entries will switch over to this method, or use a combination of the ! 116: methods. ! 117: ! 118: 3) When you connect a new site to the USENET, you should send them your current ! 119: directory of the net and a copy of these programs for them to use to announce ! 120: themselves. ! 121: ! 122: 4) Use of these programs does not exclude normal, human readable announcement ! 123: in the group net.news.newsite. It is possible to change the 'siteform' script ! 124: to post to both net.adm.site and net.news.newsite, since the entries are ! 125: generally human readable, although they do not contain the uucp name of the ! 126: site anywhere. (That is pulled from the article-id) ! 127: ! 128: Here is the shell script for the reading program, called 'siteform' ! 129: ! 130: ------------------------------------------------------------------- ! 131: san=/tmp/tan$$ ! 132: SITEGROUP=net.adm.site ! 133: echo "Give the institution type name of your site, ie. the name of your company?" ! 134: read name ! 135: echo Site: $name >$san ! 136: echo "Please give the contact userid for uucp and usenet queries" ! 137: read contact ! 138: echo Contact userid: $contact >>$san ! 139: echo "What is the real name of the contact person?" ! 140: read realname ! 141: echo Contact name: $realname >>$san ! 142: echo "What is the postal service address of your site?" ! 143: echo "Type as many lines as you like, ending with a null line" ! 144: while { read addr; test -n "$addr"; } ! 145: do echo Address: $addr >>$san ! 146: done ! 147: echo "Please give the network names of your USENET partners (the people in your" ! 148: echo "sys (or .sys) file (seperated by commas)" ! 149: read unpart ! 150: echo Usenet partners: $unpart >>$san ! 151: cat <<"blart" ! 152: Please give the network names of the people that you talk to ! 153: on the uucp network. This information is desired for a database of UUCP ! 154: connections from which UUCP aliasing files can be built through a program ! 155: written by unc!smb. List each site to which you have a uucp connection ! 156: that you wish to make public. To list a site, give its UUCP name, followed ! 157: by a value describing how useful the connection is in parentheses. Your ! 158: cost can be given as a standard arithmetic expression. The lower the number, ! 159: the better the line is. The following 'manifests' are known to the program ! 160: with the following values: (If you don't give an expression, 3000 is default) ! 161: LOCAL = 10 ! 162: ARPA = 31 ! 163: DED = 95 ! 164: DEDICATED = 95 ! 165: DIRECT = 200 ! 166: DEMAND = 300 ! 167: DIAL = 300 ! 168: DIALED = 300 ! 169: HOURLY = 500 ! 170: POLLED = 5000 ! 171: DAILY = 5000 ! 172: WEEKLY = 30000 ! 173: DEAD = INF/2 ! 174: HIGH = -5 /* baud rate bonus */ ! 175: LOW = 5 /* baud rate penalty */ ! 176: ! 177: Delimit your entries with commas. Type as many lines as you like, ! 178: (naturally, don't put a comma after the last entry) and enter a null ! 179: line when you are done. Here is an example: ! 180: decvax(2*HOURLY), watcgl(DIRECT), watarts(DEMAND), ! 181: hcr(POLLED), cbosg(WEEKLY) ! 182: blart ! 183: while { read uupart; test -n "$uupart"; } ! 184: do echo Partners: $uupart >>$san ! 185: done ! 186: echo "Please give the voice phone number of the contact person at your site." ! 187: echo "(nnn) nnn-nnnn format please" ! 188: read voiph ! 189: echo Voice phone: $voiph >>$san ! 190: echo "Please give the data dial-in number of your system if you wish to give it" ! 191: echo "Also give the type of modem on these dial in lines." ! 192: echo "Type in: (nnn) nnn-nnnn modem type" ! 193: read dialno ! 194: echo Dial in: $dialno >>$san ! 195: echo "Please give the names/classifications of newsgroups that you receive" ! 196: echo "at your site. You may want to include local area groups you work with." ! 197: echo "Example: net.all,fa.all - internally wat.all" ! 198: read ngrps ! 199: echo Subscribes to: $ngrps >>$san ! 200: echo "Please indicate your willingness to allow other sites to connect to you" ! 201: echo "for USENET news and mail. Indicate if you can call other sites, how" ! 202: echo "far you can call, or if you will only give news to those who can call you." ! 203: read will ! 204: echo Willingness: $will >>$san ! 205: echo "To help in producing a USENET map, would you please give your latitude" ! 206: echo "and longitude on the following line. please type in the figures in the" ! 207: echo "form 'deg.min D deg.min D', latitude first, longitude second. For" ! 208: echo "example, something like '43.00 N 75.00 W' is in the right format" ! 209: echo "Note that if you can't find this information, don't worry about it." ! 210: echo "You can always submit the information in a later entry" ! 211: read loc ! 212: echo Location: $loc >>$san ! 213: echo "Please enter any comments you might wish to add to your directory entry." ! 214: echo "You may want to describe what hardware you have, or just give additional" ! 215: echo "details regarding your site. Enter an EOF to indicate you are done" ! 216: while read cline ! 217: do echo Comment: $cline >>$san ! 218: done ! 219: echo "Here is your USENET directory entry. Enter a newline to send it off." ! 220: echo "Anything else will abort the sending and leave the entry in $san" ! 221: cat $san ! 222: read abrt ! 223: if test -z "$abrt" ! 224: then inews -n $SITEGROUP -t "sitedir \"$name\"" -q <$san ! 225: rm $san ! 226: else ! 227: echo "Your item is now in file $san" ! 228: echo "You may edit it, and post it with the command:" ! 229: echo "inews -n $SITEGROUP -t \"sitedir "$name"\" -q <$san" ! 230: fi ! 231: ------------------------------------------------------------------------ ! 232: ! 233: Here is the decoding program, called 'recsite', to go in /usr/lib/news if ! 234: you desire. Note a temporary file is needed, you should define it as ! 235: you like. ! 236: ! 237: ------------------------------------------------------------------------- ! 238: DIRFILE=/usr/lib/news/usenetdir ! 239: DIRTEM=/usr/lib/news/dirtem ! 240: read site ! 241: site=`echo $site | sed -e 's/^A//' -e 's/\..*$//'` ! 242: read groups ! 243: read path ! 244: path=`echo $path | sed -e 's/^[^!:]*[!:]//' -e 's/[!:]*[^!:]*$//'` ! 245: read date ! 246: read title ! 247: if test ! -r $DIRFILE; then ! 248: touch $DIRTEM ! 249: else ! 250: sed -e "/^$site;/d" >$DIRTEM <$DIRFILE ! 251: fi ! 252: while read item; do ! 253: echo "$site;$item" >>$DIRTEM ! 254: done ! 255: echo "$site;Best Path: $path" >>$DIRTEM ! 256: mv $DIRTEM $DIRFILE ! 257: -------------------------------------------------------------- ! 258: ! 259: ! 260: ! 261:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.