2006/9/15, Mick <[EMAIL PROTECTED]>:
On Friday 15 September 2006 11:58, Bo Ørsted Andresen wrote:
Thanks!  I hadn't spotted this article.  I've tried adding the following two
lines in /etc/acpid/event/default but nothing much happened (as per the log
further down):

event=button[ /]power.*
action=/usr/sbin/hibernate-ram

Well, my configuration slightly differs from your one.
--- /etc/acpid/events/default
event=.*
action=/etc/acpi/default.sh %e

--- /etc/acpid/default.sh
set $*

group=${1/\/*/}
action=${1/*\//}

case "$group" in
       button)
               case "$action" in
                       power)  echo disk > /sys/power/state
                               ;;
                       sleep)  echo disk > /sys/power/state
                               ;;
                       *)      logger "ACPI action $action is not defined"
                               ;;
               esac
               ;;

       *)
               logger "ACPI group $group / action $action is not defined"
               ;;
esac

button/power and button/sleep are _not_ the same and as the log tells
us, it's a button/sleep event. If I get this right, in your
configuration, only a button/power is handeled.

Regards,
Nico

--
gentoo-user@gentoo.org mailing list

Reply via email to