Skip to content

Instantly share code, notes, and snippets.

@nk23x
Created November 22, 2013 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nk23x/7600782 to your computer and use it in GitHub Desktop.
Save nk23x/7600782 to your computer and use it in GitHub Desktop.
press power button = suspend to disk
#!/bin/sh
## /etc/acpi/acpi_handler.sh
IFS=${IFS}/
set $@
case "$1" in
button)
case "$2" in
power ) echo -n disk > /sys/power/state
;;
*) logger "ACPI action $2 is not defined"
;;
esac
;;
*)
logger "ACPI group $1 / action $2 is not defined"
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment