1#!/bin/sh 2#
| 1#!/bin/sh 2#
|
3# $FreeBSD: head/etc/periodic/daily/310.accounting 77492 2001-05-30 16:46:53Z brian $
| 3# $FreeBSD: head/etc/periodic/daily/310.accounting 77496 2001-05-30 20:23:43Z brian $
|
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 12fi 13 14case "$daily_accounting_enable" in 15 [Yy][Ee][Ss]) 16 if [ ! -f /var/account/acct ] 17 then 18 echo '$daily_accounting_enable is set but /var/account/acct' \ 19 "doesn't exist" 20 rc=2
| 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 12fi 13 14case "$daily_accounting_enable" in 15 [Yy][Ee][Ss]) 16 if [ ! -f /var/account/acct ] 17 then 18 echo '$daily_accounting_enable is set but /var/account/acct' \ 19 "doesn't exist" 20 rc=2
|
| 21 elif [ -z "$daily_accounting_save" ] 22 then 23 echo '$daily_accounting_enable is set but ' \ 24 '$daily_accounting_save is not' 25 rc=2
|
21 else 22 echo "" 23 echo "Rotating accounting logs and gathering statistics:" 24 25 cd /var/account 26 rc=0 27 28 n=$daily_accounting_save
--- 23 unchanged lines hidden --- | 26 else 27 echo "" 28 echo "Rotating accounting logs and gathering statistics:" 29 30 cd /var/account 31 rc=0 32 33 n=$daily_accounting_save
--- 23 unchanged lines hidden --- |