FS#21767 - [acpid] handler script checks for the wrong event name
Attached to Project:
Arch Linux
Opened by Brad Conte (B-Con) - Sunday, 21 November 2010, 05:30 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 17 May 2011, 17:27 GMT
Opened by Brad Conte (B-Con) - Sunday, 21 November 2010, 05:30 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 17 May 2011, 17:27 GMT
|
Details
Description:
In /etc/acpi/handler.sh, the event that is checked for to handle the change of AC power status checks for the wrong event name, at least on my machine. The first parameter is "ac_adapter", but the second parameter is "AC", whereas in my test runs I see "ACAD" as that parameter, thus the block of code to handle AC power status changes is never executed. Also, the contends of /proc/acpi/ac_adapter only contains "ACAD", no "AC". If memory serves, it used to be "AC", so maybe this script just uses out-of-date names. If this is the case, there could be other instances in the package where the old names are used that I haven't tripped across yet. Additional info: * acpid 1.1.10-3 * /etc/acpi/handler.sh Steps to reproduce: * Add "touch /tmp/t" at line 31 in /etc/acpi/handler.sh (under: case $2, AC, case $4). * Add "echo "$*" > /tmp/args" at line 12, before the "case" statement. * Unplug and replug the AC adapter. * Note the lack of /tmp/t. * Note that argument 2 in /tmp/args is "ACAD", not "AC". |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Tuesday, 17 May 2011, 17:27 GMT
Reason for closing: Fixed
Additional comments about closing: acpid 2.0.9-1
Tuesday, 17 May 2011, 17:27 GMT
Reason for closing: Fixed
Additional comments about closing: acpid 2.0.9-1
Thomas, Jan : any objections in replacing the AC case in handler.sh by AC|ACAD|ADP0 ?