File: acpi_handler.sh

package info (click to toggle)
acpid 1.0.4-5etch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 232 kB
  • ctags: 136
  • sloc: ansic: 1,336; perl: 283; sh: 133; makefile: 78
file content (22 lines) | stat: -rwxr-xr-x 282 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# a sample skeleton for handling ACPI events

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