freebsd-dev/etc/periodic/daily
Doug Barton 0a6cd3ac6d 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.
2011-02-22 21:13:40 +00:00
..
100.clean-disks Rather than using both -prune (which requires directory-first tree traversal) 2009-06-02 07:35:51 +00:00
110.clean-tmps Don't remove empty dirs if their names are in $daily_clean_tmps_ignore 2004-02-28 04:58:40 +00:00
120.clean-preserve
130.clean-msgs
140.clean-rwho
150.clean-hoststat Use hoststat/purgestat instead of sendmail -bh/-bH so the calls can 2004-01-02 18:50:22 +00:00
200.backup-passwd
210.backup-aliases
300.calendar
310.accounting Update how accounting log files are rotated. 2011-02-22 21:13:40 +00:00
330.news
400.status-disks Silence warning printed by getfsspec(3) when /etc/fstab does not exist 2009-09-28 03:32:35 +00:00
404.status-zfs Add ZFS periodic scripts that monitors status of ZFS pools. 2007-04-06 02:33:06 +00:00
405.status-ata-raid Add status checking of ATA raid to the daily periodic scripts. 2003-10-27 20:14:53 +00:00
406.status-gmirror Add a daily script to show the status of gmirror(8) devices. 2006-01-13 18:07:52 +00:00
407.status-graid3 Add periodic scripts that check the status of graid3(8), gstripe(8) 2006-03-02 14:44:19 +00:00
408.status-gstripe Add periodic scripts that check the status of graid3(8), gstripe(8) 2006-03-02 14:44:19 +00:00
409.status-gconcat Add periodic scripts that check the status of graid3(8), gstripe(8) 2006-03-02 14:44:19 +00:00
420.status-network
430.status-rwho
440.status-mailq Remove trailing white space. No functional changes. 2010-05-14 04:53:57 +00:00
450.status-security
460.status-mail-rejects Update this script so that it handles different ruleset failures 2009-05-28 07:43:06 +00:00
470.status-named o Add missed $start variable in the grep statement back. 2006-06-11 20:39:12 +00:00
480.status-ntpd o Add a script to check ntpd(8) state. Default is off. 2007-05-13 09:33:35 +00:00
490.status-pkg-changes Add a daily script to the periodic framework that reports 2010-08-05 15:53:33 +00:00
500.queuerun
800.scrub-zfs Fix logic error introduced in previous commit. 2011-01-25 13:41:48 +00:00
999.local
Makefile Connect the new script 490.status-pkg-changes (see r210863) 2010-08-10 12:58:44 +00:00