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

Re: No fsck in battery mode



It's /proc/acpi/ac_adapter/ACAD/state on my system.
Adding:
                                                                                
#
# see if ac is online
#
                                                                                
if grep "on-line" /proc/acpi/ac_adapter/ACAD/state > /dev/null 2>&1
then
        echo "AC is on-line"
else
        echo "AC offline"
        rootcheck=no
fi
                                                                                
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!
                                                                                
Matt

Quoting Harry Brueckner (hb@o-d.de):
> Hello,
> 
> 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,
>    Harry
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-laptop-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact 
> listmaster@lists.debian.org
> 
> 
-- 
Matt Foster

mattfoster@clara.co.uk
ee1mpf@bath.ac.uk
http://www.mattfoster.clara.co.uk 
icq: 106411042



Reply to: