Deleted Added
full compact
310.accounting (77496) 310.accounting (208060)
1#!/bin/sh
2#
1#!/bin/sh
2#
3# $FreeBSD: head/etc/periodic/daily/310.accounting 77496 2001-05-30 20:23:43Z brian $
3# $FreeBSD: head/etc/periodic/daily/310.accounting 208060 2010-05-14 04:53:57Z 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

--- 12 unchanged lines hidden (view full) ---

24 '$daily_accounting_save is not'
25 rc=2
26 else
27 echo ""
28 echo "Rotating accounting logs and gathering statistics:"
29
30 cd /var/account
31 rc=0
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

--- 12 unchanged lines hidden (view full) ---

24 '$daily_accounting_save is not'
25 rc=2
26 else
27 echo ""
28 echo "Rotating accounting logs and gathering statistics:"
29
30 cd /var/account
31 rc=0
32
32
33 n=$daily_accounting_save
34 rm -f acct.$n.gz acct.$n || rc=3
35 m=$n
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; }

--- 16 unchanged lines hidden ---
33 n=$daily_accounting_save
34 rm -f acct.$n.gz acct.$n || rc=3
35 m=$n
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; }

--- 16 unchanged lines hidden ---