Article View: news.admin
Article #40562.11 rmgroup minor bug fix
From: Dennis Bednar
Date: Thu, 25 Dec 1986 10:58
Date: Thu, 25 Dec 1986 10:58
39 lines
1731 bytes
1731 bytes
The 'rmgroup' script blindly deletes articles without removing the
entries from the history file. Since expire(8) manages the history
file, rmgroup should be modified to call expire(8):
expire -n group -e 0 -E 0
Below are the context diffs for the 2.11 version of the rmgroup sh script:
PS, since expire has to rebuild the entire history file, and expire is so
slow, it might be wise to call expire only when it is known that there
really are articles in that directory. The script below, however, does it
the brute force way (i.e., it calls expires always).
*** rmgroup.old Thu Dec 25 04:58:07 1986
--- rmgroup.new Thu Dec 25 05:05:39 1986
***************
*** 16,21
dir=/usr/spool/news/"`echo $group | sed 's/\./\//g'`"
if [ -d $dir ]
then
rm $dir/*
rmdir $dir
else
--- 16,26 -----
dir=/usr/spool/news/"`echo $group | sed 's/\./\//g'`"
if [ -d $dir ]
then
+ # expire command is slow but is needed to remove
+ # entries from history file for this group.
+ # when this is over, the rm should not find any
+ # articles in that directory, if all goes well.
+ expire -n $group -e0 -E0
rm $dir/*
rmdir $dir
else
--
-Dennis Bednar
{decvax,ihnp4,harpo,allegra}!seismo!rlgvax!dennis UUCP
Technical Details
Message-ID:
<300@rlgvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!sundc!rlgvax!dennisShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!sundc!rlgvax!dennis From: dennis@rlgvax.UUCP (Dennis Bednar) Newsgroups: news.admin Subject: 2.11 rmgroup minor bug fix Message-ID: <300@rlgvax.UUCP> Date: Thu, 25-Dec-86 05:58:25 EST Article-I.D.: rlgvax.300 Posted: Thu Dec 25 05:58:25 1986 Date-Received: Thu, 25-Dec-86 18:38:04 EST Organization: Computer Consoles Inc, Reston VA Lines: 39