blob: 87abc33d28eefe64c4d58cddfe28a8a1ccf9a64c (
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
|
check_suspend()
{
grep -q mem /sys/power/state
}
do_suspend()
{
echo "mem" >/sys/power/state
}
check_hibernate()
{
[ -f /sys/power/disk ] && \
grep -q disk /sys/power/state && \
[ -c /dev/snapshot ] &&
command_exists s2disk
}
do_hibernate()
{
s2disk
}
check_suspend_hybrid()
{
grep -q mem /sys/power/state && \
command_exists s2both && \
check_hibernate
}
do_suspend_hybrid()
{
# a brief perusal of the source indicates that -f bypasses
# quirks application and the whitelist.
s2both -f
}
|