From b09f56e8b1b3ab817d6b2265524038d05eb70b68 Mon Sep 17 00:00:00 2001 From: cgd Date: Sat, 26 Feb 1994 03:29:23 +0000 Subject: [PATCH] automatically enable accounting and rotate logs --- etc/daily | 18 +++++++++--------- etc/rc | 6 ++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/etc/daily b/etc/daily index 505e35ed1378..17553cccbfc5 100644 --- a/etc/daily +++ b/etc/daily @@ -67,15 +67,15 @@ if [ -f /etc/news.expire ]; then /etc/news.expire fi -#if [ -f /var/account ]; then -# echo "" ; -# echo "Purging accounting records:" ; -# mv /var/account/acct.2 /var/account/acct.3 ; -# mv /var/account/acct.1 /var/account/acct.2 ; -# mv /var/account/acct.0 /var/account/acct.1 ; -# cp /var/account/acct /var/account/acct.0 ; -# sa -s > /dev/null ; -#fi +if [ -f /var/account/acct ]; then + echo "" ; + echo "Purging accounting records:" ; + mv /var/account/acct.2 /var/account/acct.3 ; + mv /var/account/acct.1 /var/account/acct.2 ; + mv /var/account/acct.0 /var/account/acct.1 ; + cp /var/account/acct /var/account/acct.0 ; + sa -sq ; +fi echo "" echo "Backup passwd and group files:" diff --git a/etc/rc b/etc/rc index ad864d3f8fcc..a1d9dadd69ca 100644 --- a/etc/rc +++ b/etc/rc @@ -1,5 +1,5 @@ # @(#)rc 5.27 (Berkeley) 6/5/91 -# $Id: rc,v 1.33 1994/02/01 00:36:34 cgd Exp $ +# $Id: rc,v 1.34 1994/02/26 03:29:27 cgd Exp $ # System startup script run by init on autoboot # or after single-user. @@ -160,7 +160,9 @@ echo clearing /tmp find . ! -name . ! -name lost+found ! -name quotas \ -exec rm -rf -- {} \; -type d -prune) -#echo 'turning on accounting'; accton /var/account/acct +if [ -f /var/account/acct ]; then + echo 'turning on accounting'; accton /var/account/acct +fi echo -n standard daemons: echo -n ' update'; update