freebsd-dev/usr.sbin/periodic/etc
John Grafton 9ab40bc40d 310.accounting: Verify process accounting is active before log rotation.
This corrects a bug in which the daily periodic script '310.accounting'
attempts to rotate logs via /etc/rc.d/accounting by calling
onerotate_logs function. The rotate logs function turns accounting back
on regardless of what acccounting_enable is set to in /etc/rc.conf. This
is due to checkyesno always returning YES since rotate logs is called
with the 'one' prefix.

In effect, accounting will always be turned back on once a day even if
it is disabled and stopped by hand. The fix was simple, just check if
accounting is before rotating logs and if it is, don't attempt the
rotate.

PR: 267464
Reviewed by: imp, hps (lgtm, not approval), Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/648
Differential Revision: https://reviews.freebsd.org/D37434
2023-02-28 09:59:34 -07:00
..
daily 310.accounting: Verify process accounting is active before log rotation. 2023-02-28 09:59:34 -07:00
monthly pkgbase: Create a FreeBSD-periodic package 2021-12-21 10:17:38 +01:00
security pfdenied: match actual variable name to the documented one 2022-03-12 23:59:25 +01:00
weekly pkgbase: Create a FreeBSD-periodic package 2021-12-21 10:17:38 +01:00
Makefile
Makefile.inc