#! /bin/sh
# ving -- edit the INN newsgroups file, interlocking against control messages
# Author: tale@isc.org (David Lawrence)

#  =()<. @<_PATH_SHELLVARS>@>()=
. /var/news/innshellvars

LOCK=$LOCKS/LOCK.newsgroups

if shlock -p $$ -f $LOCK; then
  :
else
  echo "$0: could not lock newsgroups file; try later" >&2
  exit 1
fi

vi $NEWSGROUPS

sort -o $NEWSGROUPS $NEWSGROUPS

rm $LOCK

