home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff319.lzh
/
CNewsSrc
/
cnews.orig.lzh
/
misc
/
delgroup
< prev
next >
Wrap
Text File
|
1989-06-27
|
947b
|
50 lines
#! /bin/sh
# delgroup - delete a newsgroup, locally only
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/lib/news/bin/config}
PATH=$NEWSCTL/bin:$NEWSBIN/maint:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK
usage="Usage: $0 groupname"
case $# in
1) ;;
*) echo "$usage" >&2 ; exit 2 ;;
esac
case "$1" in
*/*) echo "$usage" >&2 ; exit 2 ;;
esac
already="`sed 's/[ ].*//' $NEWSCTL/active | fgrep -x \"$1\"`"
if test " $already" = " "
then
echo "$0: $1 appears not to exist" >&2
exit 1
fi
lock="$NEWSCTL/LOCK"
ltemp="$NEWSCTL/L.$$"
echo $$ >$ltemp
trap "rm -f $ltemp ; exit 0" 0 1 2 15
while true
do
if newslock $ltemp $lock
then
trap "rm -f $ltemp $lock ; exit 0" 0 1 2 15
break
fi
echo 'news system locked, waiting...'
sleep 5
done
cd $NEWSCTL
awk "\$1 != \"$1\"" active >active.tmp
mv active active.old && mv active.tmp active
echo "You may wish to rm -rf $NEWSARTS/`echo "$1" | sed 's;\.;/;g'` at some poi
t."