Date: Tue, 28 Feb 2023 17:00:43 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 267464] periodic 310.accounting enables accounting even if it is disabled in rc.conf Message-ID: <bug-267464-227-Vqf0gElsQv@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-267464-227@https.bugs.freebsd.org/bugzilla/> References: <bug-267464-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267464 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D9ab40bc40d4a07e1a9f3622a7779312ca= 2466b55 commit 9ab40bc40d4a07e1a9f3622a7779312ca2466b55 Author: John Grafton <john.grafton@runbox.com> AuthorDate: 2023-02-28 16:49:40 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-02-28 16:59:34 +0000 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=C4=87 Pull Request: https://github.com/freebsd/freebsd-src/pull/648 Differential Revision: https://reviews.freebsd.org/D37434 usr.sbin/periodic/etc/daily/310.accounting | 5 +++++ 1 file changed, 5 insertions(+) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267464-227-Vqf0gElsQv>