Newsgroups: comp.unix.xenix.sco Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!hybrid!robohack!telly!moore!eastern!root From: root@eastern.COM (Don O'Shaughnessy) Subject: Re: SCO Unix 3.2r2 (MMDF) Organization: Public Affairs Services, Toronto Date: Mon, 15 Apr 91 13:53:57 GMT Message-ID: <1991Apr15.135357.11123@eastern.COM> References: <10@sfrmc.UUCP> <66@overlf.UUCP> Keywords: sendmail emanuele@overlf.UUCP (Mark A. Emanuele) writes: >> file doesn't directly know about. I thought I understood that there is soft- >> ware that will convert the uucp maps off the net into these files. Any help If you have pathalias 10 installed, the following shell script will do the job for you. Edit for local customization ----------------------------------- cut here ---------------------------------- #! /bin/sh # # Create domain and channel tables from the pathalias database # # Mark Vasoll # Computing and Information Sciences Internet: vasoll@a.cs.okstate.edu # Oklahoma State University UUCP: {cbosgd, ihnp4, rutgers, seismo, # Stillwater, Oklahoma uiucdcs}!okstate!vasoll # PATHS=/tmp/t1$$ DOMAINS=/tmp/t2$$ NODOM=/tmp/t3$$ SUMMARY=/tmp/t4$$ # MAPFILE="/u/maps/maps/*" VALIDDOMS="edu gov mil com org net arpa ar at au be ca ch cl de dk es fi fr gr ie il is it jp jpn junet kr lk my net nl no nz pt se sg su th uk us yu" # # create pathalias output, separate into domain and non-domain entries # pathalias -v $MAPFILE d.* u.* >$PATHS egrep '[^ ]*\.[^ ]* ' <$PATHS | sed 's/^\.//' | sort -fu >$DOMAINS egrep -v '[^ ]*\.[^ ]* ' <$PATHS >$NODOM # # generate some interesting stats # awk '{split($2, arr, "!"); print arr[1];}' <$PATHS >$SUMMARY echo count neighbor sort <$SUMMARY | uniq -c # # clobber old output files # rm root.dom uucp.dom uucp.chn /tmp/wk$$ 2>/dev/null # # use only those entries that contain valid top-levels # for i in $VALIDDOMS do egrep -i "\.$i[ ]" $DOMAINS >>/tmp/wk$$ done # # generate a "fake" .UUCP domain table for "non-domain" UUCP sites # to belong to. also make a suplimental "top-domain" table that # includes the domains from pathalias. also make the UUCP channel # table. awk '{printf "%s:%s.UUCP\n", $1, $1;}' $NODOM >uucp.dom awk '{printf "%s.UUCP:%s\n", $1, $2;}' $NODOM >uucp.chn awk '{printf "%s:%s\n", $1, $1;}' /tmp/wk$$ >root.dom awk '{printf "%s:%s\n", $1, $2;}' /tmp/wk$$ >>uucp.chn rm $PATHS $DOMAINS $NODOM $SUMMARY /tmp/wk$$ ---------------------------------- cut here ----------------------------------- ------------------------------------------------------------------------------- Don O'Shaughnessy | Public Affairs Services, Toronto CAN ...!{uunet, lsuc, moore}!eastern!don | V: 1 416 281 4756 F: 1 416 283 7637 -------------------------------------------------------------------------------