May be I wasn't very descript about that (may be it was that I have it all set up now and slightly forgot what was involved). So for more description. On my system acpid holds its configuration files in /etc/acpi. If you want to make all events go to a script which will handle what event should occur, you would put the following in the file /etc/acpi/default event=.* action=/etc/acpi/acpi_handler.sh %e That is how the slackware defaults are set (where /etc/acpi/acpi_handler.sh is that script I previously sent, and the event strings are passed to acpi_handler.sh as arguments ($1, $2, etc)). You can alternatively define specific events/actions in acpid conffiguration files (I don't know if you can put more than one pair in a configuration file or not, but acpid on slackware allows you to have different files in /etc/acpi/events/ which define different actions). For example you may be interested in my file /etc/acpi/events/battery which contains the following: event=battery.* action=/etc/acpi/actions/battery.sh %e Where /etc/acpi/actions/battery.sh is what is fired when a battery event occurs (see attachment for contents of that script). Also to make acpid work properly, you must ensure you have the appropriate modules loaded, eg. button for the power button to fire acpid events. All this I have described is how my Slackware system works with acpid, you may find things vary slightly on other distros. Even so I hope this has given you an overview of the workings of acpid and how it can be used. From Michael Whapples On Wed, 2007-12-19 at 20:03 +0100, Hermann wrote:
What's the function of that script and where to place it? Is it performed automatically, and if not. when to invoke it? Hermann
Attachment:
battery.sh
Description: application/shellscript