diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1999-01-28 20:03:31 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1999-01-28 20:03:31 +0000 |
commit | 19f110105242be41059ac5a34661c002c5f1a7e0 (patch) | |
tree | ee4aec59297e87844b815af5f21fd837ddeb9e0d /etc/periodic | |
parent | e288508dc30fd68e632fb04dd2c5ff1f764b1884 (diff) | |
download | src-19f110105242be41059ac5a34661c002c5f1a7e0.tar.gz src-19f110105242be41059ac5a34661c002c5f1a7e0.zip |
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.)
Notes
Notes:
svn path=/head/; revision=43358
Diffstat (limited to 'etc/periodic')
-rwxr-xr-x | etc/periodic/monthly/200.accounting | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/etc/periodic/monthly/200.accounting b/etc/periodic/monthly/200.accounting index 6361f1da8e03..8cd532f2655f 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 |