Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44278 - speedfreq init script need to check for BAT0
Summary: speedfreq init script need to check for BAT0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Michael Imhof (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-10 12:10 UTC by Steven Wagner
Modified: 2004-03-10 16:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Wagner 2004-03-10 12:10:18 UTC
Currently the speedfreq init script checks the status of BAT1, but many computers use BAT0.  This simple patch makes it work with both regardless of if the first battery is 0 or 1.

>    if [ -e /proc/acpi/battery/BAT0/state ] ; then
>       status="$(awk '/^charging/ {print $NF}' /proc/acpi/battery/BAT0/state)"
>     elif [ -e /proc/acpi/battery/BAT1/state ] ; then
---
<     if [ -e /proc/acpi/battery/BAT1/state ] ; then
Comment 1 Michael Imhof (RETIRED) gentoo-dev 2004-03-10 16:17:04 UTC
I checked in your fix.

Thanks for your help.