Busybox acpid: Difference between revisions
m (Jirutka moved page Busybox-acpid to Busybox acpid) |
m (→Action file) |
||
Line 21: | Line 21: | ||
An Action file maps the event descriptions specified in the Map file to action scripts relative to the Config directory ({{path|/etc/acpi}} by default). It performs a substring match, so typically only the second part of the description is specified in the Action file. If the target path is not a file, but directory, it executes all scripts in the directory via run-parts. For example: | An Action file maps the event descriptions specified in the Map file to action scripts relative to the Config directory ({{path|/etc/acpi}} by default). It performs a substring match, so typically only the second part of the description is specified in the Action file. If the target path is not a file, but directory, it executes all scripts in the directory via run-parts. For example: | ||
{{cat|/etc/ | {{cat|/etc/acpid.conf|PWRF power | ||
SBTN sleep | SBTN sleep | ||
SUSP suspend | SUSP suspend |
Revision as of 08:01, 8 February 2022
Busybox acpid allows custom mapping and handling of ACPI events via options -M FILE
(Map file) and -a FILE
(Action file).
Map file
A Map file maps ACPI events to descriptions (the last column). For example:
Contents of /etc/acpi.map
The built-in map file contains only PWRB/PWRF (power button) and LID (lid close).
Action file
An Action file maps the event descriptions specified in the Map file to action scripts relative to the Config directory (/etc/acpi by default). It performs a substring match, so typically only the second part of the description is specified in the Action file. If the target path is not a file, but directory, it executes all scripts in the directory via run-parts. For example:
Contents of /etc/acpid.conf
When the power button is pressed, acpid runs script /etc/acpi/power.