Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site glacier.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!glacier!reid From: reid@glacier.ARPA (Brian Reid) Newsgroups: net.news.sa Subject: Re: Are there problems if expire runs while news is being received? Message-ID: <1785@glacier.ARPA> Date: Tue, 26-Nov-85 17:39:07 EST Article-I.D.: glacier.1785 Posted: Tue Nov 26 17:39:07 1985 Date-Received: Thu, 28-Nov-85 04:33:32 EST References: <186@pluto.UUCP> <5443@allegra.UUCP> <2054@gatech.CSNET> Reply-To: reid@glacier.UUCP (Brian Reid) Organization: Stanford University, Computer Systems Lab Lines: 86 Summary: In article <2054@gatech.CSNET> spaf@gatech.UUCP (Gene Spafford) writes: >Rick Adams (rick@seismo.css.gov) posted a very nice fix to this >problem some time back. Since it is small, I will post it again >(here). Rick's fix is not good enough, for 2 reasons: (1) It doesn't prevent local postings and "recnews" postings during an expire. Now that the new mod.stupidname groups are the norm, we aren't doing so much recnews as we used to, but back in the good old "fa.*" days this was a big problem. (2) It causes dreadful problems in an ethernet environment when the "rdist" program is used. This might not bother many of you, but it sure bothered us. If somebody turns off news on the master machine, and then rdist runs, then the turned-off version of news gets distributed to all of the client machines. I don't yet have a fix for inews/recnews, but here is my modified rnews that fixes the rdist problem. You'll probably want to run with the article-eater-log code turned off, as the article-eater bug is officially fixed now. #! /bin/sh : This is a shar archive. Extract with sh, not csh. echo x - newson cat > newson << '15935!Funky!Stuff!' #! /bin/sh # # This shell script un-does the effect of "newsoff". It takes any stored # news that accumulated while news was turned off, and runs it through. # See also $NEWSLIB/newsoff and /usr/bin/rnews # # Brian Reid, October 1985 PATH=.:/usr/stanford/bin:/usr/ucb:/usr/bin:/bin: NEWSLIB=/usr/lib/news NEWSSPOOL=/usr/spool/news rm -f $NEWSLIB/rnews.lock cd $NEWSSPOOL ls -tr1 |\ grep \^rnews. |\ awk "{print \"$NEWSLIB/rnews < \",\$1,\"; rm -f \",\$1,\"\"}" |\ /bin/sh 15935!Funky!Stuff! echo x - newsoff cat > newsoff << '15935!Funky!Stuff!' #! /bin/sh # # This shell script turns off incoming news so that system maintenance runs # can continue uninterrupted. See also $NEWSLIB/newson and /usr/bin/rnews. # # Brian Reid, October 1985 NEWSLIB=/usr/lib/news if [ -f $NEWSLIB/rnews.lock ]; then echo "News is already off." else echo "News disabled by" $USER at "`date`" > $NEWSLIB/rnews.lock cat $NEWSLIB/rnews.lock fi 15935!Funky!Stuff! echo x - /usr/bin/rnews cat > rnews << '15935!Funky!Stuff!' #! /bin/sh # # This shell script replaces /usr/bin/rnews. It tests for the presence of a # lock file. If the lock file is there, then the news is hidden away in a # spool directory instead of being processed. The lock file is set by the # "newsoff" command and cleared by the "newson" command. It expects the real # rnews to be a hard link to /usr/lib/news/inews. # # Brian Reid, October 1985 NEWSLIB=/usr/lib/news NEWSSPOOL=/usr/spool/news if [ -f $NEWSLIB/rnews.lock ] then exec /bin/cat > $NEWSSPOOL/rnews.$$ else exec $NEWSLIB/rnews 2>>$NEWSLIB/article-eater-log fi 15935!Funky!Stuff! -- Brian Reid decwrl!glacier!reid Stanford reid@SU-Glacier.ARPA