[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Anacron vs. cron.

On Sat, May 01, 2004 at 01:13:22PM -0400, R. Clayton wrote:
> I've discovered that cron.daily isn't being run (the locate database is 8 days

I encountered the same symptoms some time ago on my laptop and tracked
down what I thought was a generalized bug.  After some discussion on
debian-laptop, it turned out that the problem was specific to my model
of laptop as the paths involved came from the system's bios and many of
them (Dell) are broken.  In any case here's what fixed the problem in my
case: (part of the message to debian-laptop)

Log files were not being rotated, so I started backtracking to find out
why.  It turns out that Anacron wasn't being started because of a bug in
/usr/bin/on_ac_power.  This script checks if the AC power is on, and if
it is not, does not start anacron.  It turns out that the ACPI file it
checks is not the correct one, and so anacron never starts, even when on
AC power.  The following snippet of code is what's in the standard
distribution (3.0r2):

acpi_available && [ -r /proc/acpi/ac_adapter/0/status ] && {
  grep on-line /proc/acpi/ac_adapter/0/status >/dev/null 2>&1 && exit 0
  grep off-line /proc/acpi/ac_adapter/0/status >/dev/null 2>&1 && exit 1

It should be replaced with the following

acpi_available && [ -r /proc/acpi/ac_adapter/AC/state ] && {
  grep on-line /proc/acpi/ac_adapter/AC/state >/dev/null 2>&1 && exit 0
  grep off-line /proc/acpi/ac_adapter/AC/state >/dev/null 2>&1 && exit 1

as that is the real location of the ACPI file (at least for kernel 2.4.24).

(end of previous message to debian-laptop)

This issue has been addressed and resolved in the sarge release,
according to the maintainer, and it might not be what's causing your
problem, but it's worth checking.


Reply to: