EeePC 901 has /proc/acpi/ac_adapter/AC0, so check all AC entries.
This commit is contained in:
parent
0ffe5caf18
commit
aaa0498bf8
@ -32,8 +32,8 @@ _forcefsck()
|
|||||||
|
|
||||||
_on_ac_power()
|
_on_ac_power()
|
||||||
{
|
{
|
||||||
if [ -f /proc/acpi/ac_adapter/AC/state ]; then
|
if [ -f /proc/acpi/ac_adapter/AC*/state ]; then
|
||||||
cat /proc/acpi/ac_adapter/AC/state | while read line; do
|
cat /proc/acpi/ac_adapter/AC*/state | while read line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
"state:"*"off-line") return 128;;
|
"state:"*"off-line") return 128;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user