Comment 6 for bug 89752

Revision history for this message
Ian Redfern (ian-redfern) wrote : Re: skipping fsck while booting on battery

Does on_ac_power report 255 when the file system check runs, before the ac module has been inserted?

The easiest way to find out is to modify /etc/init.d/checkfs.sh to do something like

log_success_msg "Result from on_ac_power is $?"
sleep 5

after it runs on_ac_power.

The following patch has worked for me, and I no longer get fscks on battery:

$ diff -u /sbin/on_ac_power.orig /sbin/on_ac_power
--- /sbin/on_ac_power.orig 2007-04-05 17:01:23.000000000 +0100
+++ /sbin/on_ac_power 2007-04-07 11:27:50.000000000 +0100
@@ -20,6 +20,7 @@
 # that have known states. If any adapter is on-line, we return 0. If
 # no adapters are on-line but one or more are off-line, we return 1.
 #
+modprobe ac
 if /sbin/acpi_available && [ -d /proc/acpi/ac_adapter ]; then
     OFF_LINE_P=no
     for FN in /proc/acpi/ac_adapter/*; do