Restore broken accounting statistics:

1) It have nothing common to (new)syslog messages
2) acct.* rotating allowed only after "sa -s" run!
This commit is contained in:
Andrey A. Chernov 1996-01-06 22:19:37 +00:00
parent b48c870e33
commit 615773cb2b
2 changed files with 15 additions and 2 deletions

View File

@ -29,11 +29,25 @@ echo "You did not enable the cleaning of / in /etc/daily!"
# -o -name '*.CKP' -o -name '.emacs_[0-9]*' \) \
# -a -atime +3 -exec rm -f -- {} \;
#
# remove system messages older than 21 days
msgs -c
if [ -f /etc/news.expire ]; then
/etc/news.expire
fi
if [ -f /var/account/acct ] ; then
echo ""
echo "Gathering accounting statistics:"
cd /var/account
if [ -f acct.2 ] ; then mv -f acct.2 acct.3 ; fi
if [ -f acct.1 ] ; then mv -f acct.1 acct.2 ; fi
if [ -f acct.0 ] ; then mv -f acct.0 acct.1 ; fi
cp -pf acct acct.0
sa -s > /dev/null
fi
echo ""
echo "Backup passwd and group files:"
if [ ! -f $bak/master.passwd.bak ] ; then

View File

@ -1,8 +1,7 @@
# configuration file for newsyslog
# $Id: newsyslog.conf,v 1.1 1996/01/05 10:24:03 graichen Exp $
# $Id: newsyslog.conf,v 1.2 1996/01/06 21:47:07 ache Exp $
#
# logfilename owner.group mode ngen size time [ZB]
/var/account/acct 664 3 * 24 ZB
/var/cron/log 600 3 10 * Z
/var/log/kerberos.log 664 7 10 * Z
/var/log/lpd-errs 664 7 10 * Z