Re: No fsck in battery mode
It's /proc/acpi/ac_adapter/ACAD/state on my system.
# see if ac is online
if grep "on-line" /proc/acpi/ac_adapter/ACAD/state > /dev/null 2>&1
echo "AC is on-line"
echo "AC offline"
to line 39 of /etc/init.d/checkroot.sh (after where a load of variables are set) does what you want, at least on my system.
BTW acpi is built into the kernel, you may find that /proc/acpi/* don't
exist until after the modules are loaded.
HTH, and cheers for a good idea!
Quoting Harry Brueckner (email@example.com):
> is there a way to avoid the regular fsck run (every n mounts or after m
> days) when the laptop is in battery mode?
> I think its quite a waste of battery power for the fsck run and
> rescheduling for the next reboot (with powersupply available) would be very
> nice. :-)
> Any idea how to get around the fsck run?
> TIA for any ideas,
> To UNSUBSCRIBE, email to firstname.lastname@example.org
> with a subject of "unsubscribe". Trouble? Contact