home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Unix System Administration Handbook 1997 October
/
usah_oct97.iso
/
news
/
cnews.tar
/
conf
/
histsetup
< prev
next >
Wrap
Text File
|
1995-04-27
|
536b
|
33 lines
#! /bin/sh
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/etc/news/bin/config}
PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK
cd $NEWSCTL
touch history || exit 1
if test -s history
then
if dbz -v history
then
exit 0
fi
echo '*** history file exists but index is not dbz format' >&2
exit 1
fi
lock -o LOCK $$ || { echo '*** cannot get the lock file' >&2 ; exit 1 ; }
status=1
trap 'unlock LOCK ; trap 0 ; exit $status' 0 1 2 15
dbz history || exit
status=0 # and the trap does the exit