mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
acpid: misc improvements to our handler script.
- On sleep button or lid close exec zzz(8) (suspend-to-ram) - Improve logged messages with some events.
This commit is contained in:
parent
dc683dfa5a
commit
a0cfc61b67
2 changed files with 11 additions and 6 deletions
|
@ -15,7 +15,7 @@ case "$1" in
|
||||||
#echo "PowerButton pressed!">/dev/tty5
|
#echo "PowerButton pressed!">/dev/tty5
|
||||||
case "$2" in
|
case "$2" in
|
||||||
PBTN|PWRF)
|
PBTN|PWRF)
|
||||||
logger "PowerButton pressed: $2"
|
logger "PowerButton pressed: $2, shutting down..."
|
||||||
shutdown -P now
|
shutdown -P now
|
||||||
;;
|
;;
|
||||||
*) logger "ACPI action undefined: $2" ;;
|
*) logger "ACPI action undefined: $2" ;;
|
||||||
|
@ -24,8 +24,9 @@ case "$1" in
|
||||||
button/sleep)
|
button/sleep)
|
||||||
case "$2" in
|
case "$2" in
|
||||||
SBTN|SLPB)
|
SBTN|SLPB)
|
||||||
logger "Sleep Button pressed: $2"
|
# suspend-to-ram
|
||||||
echo -n mem >/sys/power/state
|
logger "Sleep Button pressed: $2, suspending..."
|
||||||
|
zzz
|
||||||
;;
|
;;
|
||||||
*) logger "ACPI action undefined: $2" ;;
|
*) logger "ACPI action undefined: $2" ;;
|
||||||
esac
|
esac
|
||||||
|
@ -64,8 +65,12 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
button/lid)
|
button/lid)
|
||||||
case "$3" in
|
case "$3" in
|
||||||
close) logger "LID closed" ;;
|
close)
|
||||||
open) logger "LID opened" ;;
|
# suspend-to-ram
|
||||||
|
logger "LID closed, suspending..."
|
||||||
|
zzz
|
||||||
|
;;
|
||||||
|
open) logger "LID opened" ;;
|
||||||
*) logger "ACPI action undefined (LID): $2";;
|
*) logger "ACPI action undefined (LID): $2";;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'acpid'
|
# Template file for 'acpid'
|
||||||
pkgname=acpid
|
pkgname=acpid
|
||||||
version=2.0.23
|
version=2.0.23
|
||||||
revision=4
|
revision=5
|
||||||
build_options="systemd"
|
build_options="systemd"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
conf_files="/etc/acpi/events/anything /etc/acpi/handler.sh"
|
conf_files="/etc/acpi/events/anything /etc/acpi/handler.sh"
|
||||||
|
|
Loading…
Add table
Reference in a new issue