310.accounting (208060) | 310.accounting (218961) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/periodic/daily/310.accounting 208060 2010-05-14 04:53:57Z dougb $ | 3# $FreeBSD: head/etc/periodic/daily/310.accounting 218961 2011-02-22 21:13:40Z dougb $ |
4# 5 6# If there is a global system configuration file, suck it in. 7# 8if [ -r /etc/defaults/periodic.conf ] 9then 10 . /etc/defaults/periodic.conf 11 source_periodic_confs --- 24 unchanged lines hidden (view full) --- 36 n=$(($n - 1)) 37 while [ $n -ge 0 ] 38 do 39 [ -f acct.$n.gz ] && { mv -f acct.$n.gz acct.$m.gz || rc=3; } 40 [ -f acct.$n ] && { mv -f acct.$n acct.$m || rc=3; } 41 m=$n 42 n=$(($n - 1)) 43 done | 4# 5 6# If there is a global system configuration file, suck it in. 7# 8if [ -r /etc/defaults/periodic.conf ] 9then 10 . /etc/defaults/periodic.conf 11 source_periodic_confs --- 24 unchanged lines hidden (view full) --- 36 n=$(($n - 1)) 37 while [ $n -ge 0 ] 38 do 39 [ -f acct.$n.gz ] && { mv -f acct.$n.gz acct.$m.gz || rc=3; } 40 [ -f acct.$n ] && { mv -f acct.$n acct.$m || rc=3; } 41 m=$n 42 n=$(($n - 1)) 43 done |
44 cp -pf acct acct.0 || rc=3 45 sa -s $daily_accounting_flags || rc=3 | |
46 | 44 |
45 /etc/rc.d/accounting rotate_log || rc=3 46 |
|
47 case "$daily_accounting_compress" in 48 [Yy][Ee][Ss]) | 47 case "$daily_accounting_compress" in 48 [Yy][Ee][Ss]) |
49 gzip -f acct.0 || rc=3;; | 49 gzip --keep -f acct.0 || rc=3;; |
50 esac | 50 esac |
51 52 sa -s $daily_accounting_flags /var/account/acct.0 && 53 unlink acct.0 || rc=3 |
|
51 fi;; 52 53 *) rc=0;; 54esac 55 56exit $rc | 54 fi;; 55 56 *) rc=0;; 57esac 58 59exit $rc |