Red Hat Bugzilla – Bug 83770
anacron should not be run on resume if not an enabled service
Last modified: 2015-01-07 19:03:20 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120
Description of problem:
will start anacron if a machine is resumed
from a suspended state, even though the
anacron service is disabled.
On my laptop I normally disable all
cron-related services. If the anacron
service is disabled, it should never be
started unless I choose to run it manually.
The apmscript should check to see if the
anacron service is enabled before running
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. use ntsysv (or equiv.) to disable anacron service
2. put the machine in suspend mode (apm --suspend)
3. resume the machine
4. you will find that anacron is running (and possibly
updatedb is running, making your disk very busy)
Actual Results: It behaves as described.
Expected Results: anacron should never run if the anacron
service is disabled.
I first noticed the bug in RedHat 7.1.
It still exists on RedHat 8.0.
As a simple work-around, you can do this:
mv /etc/anacrontab /etc/anacrontab.save
anacron starts and exits if the anacrontab
does not exist.
It's intentional to catch anything that should have been run during the suspend
I don't agree.
If the anacron service was not enabled to run at all,
then nothing should have been run during the suspend period.
So nothing should be run after the resume.
Perhaps if anacron *and* cron were both off, maybe.
REOPENED status has been deprecated. ASSIGNED with keyword of Reopened is preferred.
As wrote Bill Nottingham, It's intentional to catch anything that was missed
during the suspend period, more precisely what cron or/and anacron missed. So, I
think, if cron is running and anacron is not, then, after suspend and resume,
the anacron slould be executed.
Maybe, if both are not running, then, after suspend and resume, the anacron
should not be executed.