>Number: 160848 >Category: misc >Synopsis: [patch] [etc/periodic] 310.accounting ignore >$daily_accounting_save >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 20 12:20:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Andrey Zonov >Release: 8.2-STABLE >Organization: >Environment: >Description: Last commit to /etc/periodic/daily/310.accounting broke rotation accounting logs. >How-To-Repeat: Turn on accouting: echo 'accounting_enable="YES"' > /etc/rc.conf.d/accounting
Check /var/account/ after few days. You will find that there's only one `acct' file. >Fix: Patch is in attach. Patch attached with submission follows: Index: 310.accounting =================================================================== --- 310.accounting (revision 225579) +++ 310.accounting (working copy) @@ -44,13 +44,12 @@ /etc/rc.d/accounting rotate_log || rc=3 + sa $daily_accounting_flags /var/account/acct.0 || rc=3 + case "$daily_accounting_compress" in [Yy][Ee][Ss]) - gzip --keep -f acct.0 || rc=3;; + gzip -f acct.0 || rc=3;; esac - - sa -s $daily_accounting_flags /var/account/acct.0 && - unlink acct.0 || rc=3 fi;; *) rc=0;; >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"