File: acpi_handler.sh

package info (click to toggle)
acpid 1%3A2.0.34-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,152 kB
  • sloc: sh: 4,602; ansic: 4,382; perl: 283; makefile: 37
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