blob: 42dec590043304fdbb6f2fd1f90c04712b3c7d5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#!/bin/bash
# Default acpi script that takes an entry for all actions
case "$1" in
button/sleep)
case "$2" in
SLPB|SBTN)
logger 'SleepButton pressed'
/bin/loginctl suspend
rc-service my-x200 restart
;;
*)
logger "ACPI action undefined: $2"
;;
esac
;;
button/suspend)
case "$2" in
SUSP)
logger 'SuspendButton pressed'
/bin/loginctl sleep
rc-service my-x200 restart
;;
*)
logger "ACPI action undefined: $2"
;;
esac
;;
button/lid)
case "$3" in
close)
/bin/loginctl suspend
logger 'LID closed'
;;
open)
logger 'LID opened'
rc-service my-x200 restart
;;
*)
logger "ACPI action undefined: $3"
;;
esac
;;
button/vendor)
case "$2" in
VNDR)
logger 'ThinkVantage pressed'
/etc/init.d/my-x200 refresh
;;
*)
logger "ACPI action undefined: $2"
;;
esac
;;
esac
|