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

Re: Cron startup bug (3.0r2 on Dell 8600/2.4.24)



Hello again!

> I have a similar problem on my Acer Travelmate 801. Now that I have
> checked the script you mentioned, and found it being correct, I was
> just wondering how to troubleshoot the anacron not starting. Where
> did you begin to search?

Sorry, forgot to mention that I am running Testing/Unstable on kernel 2.4.24.

Thanks in advance, Martin Bock

A. F. Cano wrote:
Hi everyone,

This might be old news to everyone else, but I didn't see any reference
to it while I was tracking down the problem.

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).

A.






Reply to: