File: acpi_handler.sh

package info (click to toggle)
acpid 1%3A2.0.7-1squeeze4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 540 kB
  • ctags: 478
  • sloc: ansic: 3,443; perl: 283; sh: 270; makefile: 138
file content (24 lines) | stat: -rwxr-xr-x 371 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# A sample skeleton for handling ACPI events.
# See acpi_handler-conf for a configuration file that can be used to
# run this script.

if [ $# != 1 ]; then
	exit 1
fi
set $*

case "$1" in
	button)
		case "$2" in
			power)	/sbin/init 0
				;;
			*)	logger "ACPI action $2 is not defined"
				;;
		esac
		;;

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