Busybox acpid: Difference between revisions
(Created page with "Busybox acpid allows custom mapping and handling of ACPI events via options <code>-M FILE</code> (Map file) and <code>-a FILE</code> (Action file). == Map file == A Map file...") |
(add power management category) |
||
(4 intermediate revisions by 2 users not shown) | |||
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 | ||
Line 35: | Line 35: | ||
* https://oldforum.puppylinux.com/viewtopic.php?p=778500#p778500 | * https://oldforum.puppylinux.com/viewtopic.php?p=778500#p778500 | ||
[[Category:Power Management]] |
Latest revision as of 23:55, 24 August 2023
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.