Xref: utzoo news.software.b:2644 news.sysadmin:2582 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!orion.cf.uci.edu!uci-ics!zardoz!tgate!ka3ovk!drilex!axiom!adelie!mirror!frog!john From: john@frog.UUCP (John Woods) Newsgroups: news.software.b,news.sysadmin Subject: Re: How do I issue a "sendme" control message? Keywords: ihave, sendme, control Message-ID: <1652@frog.UUCP> Date: 19 Jul 89 22:38:00 GMT References: <749@icus.islp.ny.us> Followup-To: news.software.b Organization: Misanthropes-R-Us Lines: 57 In article <749@icus.islp.ny.us>, lenny@icus.islp.ny.us (Lenny Tropiano) writes: > I had the infamous System V i-node demon attack me today... lost all > my i-nodes, and then did a fsck and they came back. Lost about 40 news > articles, I would like to retrieve them. How would I go about > issuing a "sendme" control message with those message-id's that are > in my errlog ... The following is a shell-script that I keep around just for such emergencies. It assumes the presense of a SystemV-like date command, such as the one I posted to alt.sources and comp.unix.something-or-other a few months back, and it assumes that uname is the proper way to find out your host name, and that `uname`.UUCP is your news domain name. Change these last to suit yourself. NEWSSITE should be what your news neighbor knows you as, and HOST is what appears in the From: line and Message-ID: line. You could speed it up a little by just looking at one of your own messages and filling in these items accordingly. The input is a list of article ids, the output is a news article suitable for piping to uux (as in "forgesendme lost_list | uux - neighbor!rnews"). The massaging of errlog into Message-id's is left to the student as an exercise :-). ----snip----------------snip----------------snip--------------------------- #! /bin/sh # forgesendme -- a shell script which invents a control article asking # for lost news. If an argument is given, it is a file containing # article ids, otherwise article ids are read from standard input. if [ $# -eq 0 ] then filename=/tmp/idlike.$$ trap 'rm -f $filename' 0 1 2 3 15 cat > $filename set $filename fi LINES=`wc -l <$1` NEWSSITE=`uname` # change if inappropriate HOST=$NEWSSITE.UUCP # change if inappropriate cat << @@@ Path: $NEWSSITE!news From: news@$HOST Newsgroups: control Subject: sendme $NEWSSITE Message-ID: <`date +%d%h%y.%T`@$HOST> Date: `date "+%d %h 19%y %T` Control: sendme $NEWSSITE Organization: Restoring crashed partition Lines: $LINES `cat $1` @@@ -- John Woods, Charles River Data Systems, Framingham MA, (508) 626-1101 ...!decvax!frog!john, john@frog.UUCP, ...!mit-eddie!jfw, jfw@eddie.mit.edu People...How you gonna FIGURE 'em? Don't bother, S.L.--Just stand back and enjoy the EVOLUTIONARY PROCESS...