🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.misc
Article #5540

Re: Updating UUCP maps?

#5540
From: Rich Salz
Date: Wed, 21 Feb 1990 16:15
67 lines
2251 bytes
I use uuhosts to unpack the maps, and rebuild whenever any new maps
come in.  I ignore generally ignore news.config updates, but I read
them so that if someone complains about email problems, I have an
idea where to look.

Here's the first part of the script that's run nightly out of cron.
I particularly like the "elif echo ..." line.
	/r$

#! /bin/sh -vx
##  Script to build UUCP maps if the uuhosts Index file has been modified.
##  This script is in three major sections, each with its own config data.

##
##  PROLOG SECTION
##
PATH=/usr/uucp/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin: ; export PATH

##  Capture output.
if [ "$1" = "" ] ; then
    exec >/usr/uucp/bin/make-uucp-maps.out 2>&1
fi
cd /usr/spool/ftp/uumap/comp.mail.maps
echo "Started map script on `date`."

##  Ensure the index file exists; if it does, and it's new, make new maps.
uuhosts -unbatch
if [ ! -r Index ] ; then
    echo "Rebuilding uuhosts index file."
    uuhosts -i
elif echo "COSTS PATHS: Index; @/bin/false" | make -qf - ; then
    exec echo "No new map data."
fi


##
##  PATHALIAS SECTION
##
echo "Starting pathalias on `date`."

##  Dead machines and links.
DEAD=""

##  Overloaded machines and links.
AVOID=""

##  Debugging.
TRACE=""
DEBUG="-vvv ${TRACE}"

##  The path files.  First read local updates like u.BBN, then read the
##  domain files, then the raw map files.
P1="u.[A-Z]*"
P2="d.*"
P3="u.[a-z]*"
PATHS="${P1} ${P2} ${P3}"

##  Crunch, crunch
pathalias -i -c ${DEBUG} ${DEAD} ${AVOID} ${PATHS} |\
	awk '{ printf "%s\t%s\t%s\n", $2, $1, $3 }' >COSTS
awk '{ printf "%s\t%s\n", $1, $3 }' <COSTS >PATHS
sort +1.0 -n -o COSTS COSTS
sort -f -o PATHS PATHS

-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.
Technical Details
Message-ID: <2274@litchi.bbn.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ns-mx!iowasp!deimos!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!usc!apple!bbn!bbn.com!rsalz
References: <52@dynasys.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ns-mx!iowasp!deimos!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!usc!apple!bbn!bbn.com!rsalz
From: rsalz@bbn.com (Rich Salz)
Newsgroups: comp.mail.misc,comp.mail.uucp
Subject: Re: Updating UUCP maps?
Message-ID: <2274@litchi.bbn.com>
Date: 21 Feb 90 16:15:14 GMT
References: <52@dynasys.UUCP>
Organization: BBN Systems and Technologies Corporation
Lines: 67