From owner-cvs-src-old@FreeBSD.ORG Tue Feb 22 21:13:57 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 325A410657F2 for ; Tue, 22 Feb 2011 21:13:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1D8818FC0A for ; Tue, 22 Feb 2011 21:13:57 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p1MLDvqU013083 for ; Tue, 22 Feb 2011 21:13:57 GMT (envelope-from dougb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p1MLDvpP013082 for cvs-src-old@freebsd.org; Tue, 22 Feb 2011 21:13:57 GMT (envelope-from dougb@repoman.freebsd.org) Message-Id: <201102222113.p1MLDvpP013082@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to dougb@repoman.freebsd.org using -f From: Doug Barton Date: Tue, 22 Feb 2011 21:13:40 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/etc/periodic/daily 310.accounting src/etc/rc.d accounting X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 21:13:57 -0000 dougb 2011-02-22 21:13:40 UTC FreeBSD src repository Modified files: etc/periodic/daily 310.accounting etc/rc.d accounting Log: SVN rev 218961 on 2011-02-22 21:13:40Z by dougb Update how accounting log files are rotated. The old version had a race between the time that the old file was cp'ed to acct.0 and the time that 'sa -s' was run that prevented the commands that occurred in the meantime from being backed up. It's also arguable that the old version was inefficient in using cp which can be a problem on a space-constrained system. This version avoids both problems, albeit it's considerably more complicated. The advantage of putting the log rotation in the rc.d script is that it can handle the _enable and _file questions without having to do gymnastics to discover either value in the periodic script. As a side effect of reviewing the rc.d script I cleaned it up a bit. Revision Changes Path 1.10 +6 -3 src/etc/periodic/daily/310.accounting 1.12 +32 -8 src/etc/rc.d/accounting