Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 284865 Details for
Bug 380933
sys-apps/openrc: on_ac_power misses "ADP1" adapters
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix AC adapter presence recognition
openrc-0.8.3-on_ac_power.patch (text/plain), 986 bytes, created by
Alexei Ababilov
on 2011-08-28 11:55:38 UTC
(
hide
)
Description:
patch to fix AC adapter presence recognition
Filename:
MIME Type:
Creator:
Alexei Ababilov
Created:
2011-08-28 11:55:38 UTC
Size:
986 bytes
patch
obsolete
>diff -Naur openrc-0.8.2.orig/scripts/on_ac_power openrc-0.8.2/scripts/on_ac_power >--- openrc-0.8.2.orig/scripts/on_ac_power 2011-04-16 03:48:30.000000000 +0300 >+++ openrc-0.8.2/scripts/on_ac_power 2011-04-30 15:50:34.000000000 +0300 >@@ -3,14 +3,14 @@ > # Copyright (c) 2007-2009 Roy Marples <roy@marples.name> > > # Exit 0 if on AC power, 1 if not and 255 if we don't know how to work it out >-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/*/state ]; then >+ cat /proc/acpi/ac_adapter/*/state | while read line; do > case "$line" in > "state:"*"off-line") exit 128;; > esac > done >-elif [ -f /sys/class/power_supply/AC*/online ]; then >- cat /sys/class/power_supply/AC*/online | while read line; do >+elif [ -f /sys/class/power_supply/*/online ]; then >+ cat /sys/class/power_supply/*/online | while read line; do > [ "${line}" = 0 ] && exit 128 > done > elif [ -f /proc/pmu/info ]; then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 380933
: 284865