summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1999-01-28 20:03:31 +0000
committerwollman <wollman@FreeBSD.org>1999-01-28 20:03:31 +0000
commit86eed8a334dbab8b6db1e28171f8c24a5ee6e1b1 (patch)
tree6e7acdf86932504ed459e4f675131c018e8c9378 /etc
parent01f6cd279e5bbef327659211599b6bd95d5542c9 (diff)
downloadFreeBSD-src-86eed8a334dbab8b6db1e28171f8c24a5ee6e1b1.zip
FreeBSD-src-86eed8a334dbab8b6db1e28171f8c24a5ee6e1b1.tar.gz
Now that newsyslog is capable of doing this at a specific time,
let it rotate /var/log/wtmp again, and update monthly/200.accounting to take this into account. (Some sites might want to change the parameters of the rotation; it's easier to do this when it's all centralized in newsyslog.conf.)
Diffstat (limited to 'etc')
-rw-r--r--etc/newsyslog.conf5
-rwxr-xr-xetc/periodic/monthly/200.accounting15
2 files changed, 6 insertions, 14 deletions
diff --git a/etc/newsyslog.conf b/etc/newsyslog.conf
index 998b33c..c35df22 100644
--- a/etc/newsyslog.conf
+++ b/etc/newsyslog.conf
@@ -1,5 +1,5 @@
# configuration file for newsyslog
-# $Id: newsyslog.conf,v 1.15 1998/04/14 23:05:26 jmb Exp $
+# $Id: newsyslog.conf,v 1.16 1998/06/09 18:26:16 ache Exp $
#
# logfilename owner.group mode count size time [ZB] [/pid_file] [sig_num]
/var/cron/log 600 3 100 * Z
@@ -7,7 +7,8 @@
/var/log/kerberos.log 664 7 100 * Z
/var/log/lpd-errs 664 7 100 * Z
/var/log/maillog 664 7 * 24 Z
-/var/log/sendmail.st 664 10 * 168 B
+/var/log/sendmail.st 664 10 * 168 B
/var/log/messages 664 5 100 * Z
/var/log/slip.log 600 3 100 * Z
/var/log/ppp.log 600 3 100 * Z
+/var/log/wtmp 644 3 * @01T05 B
diff --git a/etc/periodic/monthly/200.accounting b/etc/periodic/monthly/200.accounting
index 6361f1d..8cd532f 100755
--- a/etc/periodic/monthly/200.accounting
+++ b/etc/periodic/monthly/200.accounting
@@ -1,23 +1,14 @@
#!/bin/sh -
#
-# $Id: 200.accounting,v 1.1.1.1 1997/08/16 17:04:01 pst Exp $
+# $Id: 200.accounting,v 1.2 1998/02/09 11:36:43 danny Exp $
#
W=/var/log/wtmp
-if [ -f $W ] ; then
- # Work out last month's name
- M=`date -v-1m +%h`
-
- mv -f $W $W.$M
- touch $W
-
+if [ -f ${W}.0 ] ; then
if [ -x /usr/sbin/ac ] ; then
echo ""
echo "Doing login accounting:"
- ac -p -w $W.$M | sort -nr +1
+ ac -p -w ${W}.0 | sort -nr +1
fi
-
- rm -f $W.$M.gz
- gzip $W.$M
fi
OpenPOWER on IntegriCloud