https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267464
John Grafton <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #2 from John Grafton <[email protected]> --- I was able to replicate this bug on my system. I think a simple fix is to check if the accounting system process is running in the periodic script. If not, exit the periodic script indicating the service is not running instead of attempting to rotate the logs. onerotate_log turns accounting back on regardless of what accounting_enable is set to. I tested this patch on my local system and the periodic log rotate exits and doesn't restart the accounting service if the [accounting] process is not running. diff --git a/usr.sbin/periodic/etc/daily/310.accounting b/usr.sbin/periodic/etc/daily/310.accounting index b0dd786447eb..6a47690a0a6a 100755 --- a/usr.sbin/periodic/etc/daily/310.accounting +++ b/usr.sbin/periodic/etc/daily/310.accounting @@ -18,6 +18,10 @@ case "$daily_accounting_enable" in echo '$daily_accounting_enable is set but /var/account/acct' \ "doesn't exist" rc=2 + elif ! pgrep -qS accounting + then + echo 'accounting service is not active' + rc=2 elif [ -z "$daily_accounting_save" ] then echo '$daily_accounting_enable is set but ' \ -- You are receiving this mail because: You are the assignee for the bug.
