summaryrefslogtreecommitdiff
path: root/pm-suspend
blob: 77526a1bb65b7eef2921ed606adfb17004376936 (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
#!/bin/sh

# Simple suspend script
# Based on work from:
#    Bill Nottingham <notting@redhat.com>
#    Peter Jones <pjones@redhat.com>
#    David Zeuthen <davidz@redhat.com>

# The rule here? Simplicity.

. /etc/pm/functions

take_suspend_lock || exit 1

run_hooks suspend

sync ; sync ; sync

echo -n "mem" > /sys/power/state

run_hooks resume reverse

remove_suspend_lock 200