summaryrefslogtreecommitdiffstats
path: root/etc/daily
diff options
context:
space:
mode:
authorcsgr <csgr@FreeBSD.org>1994-05-19 12:34:48 +0000
committercsgr <csgr@FreeBSD.org>1994-05-19 12:34:48 +0000
commit2da9c64395efbb90352f2b781db109b172e64440 (patch)
tree05c3ef6683fbbcaa032a6d85b66d739b27e305c6 /etc/daily
parentd9421d497afe3470af6bc6f2769c18d4bb62d750 (diff)
downloadFreeBSD-src-2da9c64395efbb90352f2b781db109b172e64440.zip
FreeBSD-src-2da9c64395efbb90352f2b781db109b172e64440.tar.gz
Turn on purging of accounting records in /etc/daily.
(Now that we have sa)
Diffstat (limited to 'etc/daily')
-rw-r--r--etc/daily19
1 files changed, 12 insertions, 7 deletions
diff --git a/etc/daily b/etc/daily
index 7b8258c..b306825 100644
--- a/etc/daily
+++ b/etc/daily
@@ -56,13 +56,18 @@ if [ -f /etc/news.expire ]; then
/etc/news.expire
fi
-#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
+if [ -d /var/account ] ; then
+ echo ""
+ echo "Purging accounting records:"
+ 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
+ if [ -f acct ] ; then
+ cp -pf acct acct.0
+ sa -s > /dev/null
+ fi
+fi
echo ""
echo "Backup passwd and group files:"
OpenPOWER on IntegriCloud