3 # $NetBSD: hotkey_button,v 1.1 2007/12/22 19:04:11 jmcneill Exp $
5 # Generic script for hotkey events.
7 # Arguments passed by powerd(8):
11 PATH
=/usr
/pkg
/bin
:$PATH; export PATH
13 # XXXJDM need a better way to determine this
14 XUSER
="$(ls -l /dev/console | awk '{ print $3; }')"
15 DISPLAY
=:0.0; export DISPLAY
19 if [ -f "/etc/powerd/actions/${1}" ]; then
20 /usr
/bin
/su
-- "$XUSER" -c "/etc/powerd/actions/${1}"
27 logger
-p warning
"${0}: unsupported event ${2} on device ${1}" >&1