freebsd-nq/usr.sbin/periodic
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
..
etc 310.accounting: Verify process accounting is active before log rotation. 2023-02-28 09:59:34 -07:00
Makefile pkgbase: Create a FreeBSD-periodic package 2021-12-21 10:17:38 +01:00
Makefile.depend
periodic.8 Improve periodic(8) manual page presentation 2020-06-18 10:52:51 +00:00
periodic.conf pfdenied: support reporting on additional anchors 2022-03-10 12:08:59 +01:00
periodic.sh periodic: switch lockf to silent operation. 2023-02-28 09:38:42 +01:00