EeePC 901 has /proc/acpi/ac_adapter/AC0, so check all AC entries.

This commit is contained in:
Semen Maryasin 2009-10-12 08:21:50 +01:00 committed by Roy Marples
parent 0ffe5caf18
commit aaa0498bf8

View File

@ -32,8 +32,8 @@ _forcefsck()
_on_ac_power()
{
if [ -f /proc/acpi/ac_adapter/AC/state ]; then
cat /proc/acpi/ac_adapter/AC/state | while read line; do
if [ -f /proc/acpi/ac_adapter/AC*/state ]; then
cat /proc/acpi/ac_adapter/AC*/state | while read line; do
case "$line" in
"state:"*"off-line") return 128;;
esac