blob: e4df259c8e7e8278839412aad79bf5d72525959a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# vim:set ft=sh:
run_hook ()
{
fmtdevice () { echo "${1}:${2}"; }
# Try resuming with tuxonice
tuxoniceroot="/sys/power/tuxonice"
if [ -d "${tuxoniceroot}" -a -n "${resume}" ]; then
echo ${resume} > ${tuxoniceroot}/resume
echo > ${tuxoniceroot}/do_resume
fi
# Try resuming with vanilla hibernation
if [ -e "/sys/power/resume" -a -n "${resume}" ]; then
eval $(/bin/parseblock "${resume}")
fmtdevice ${BLOCKDEVICE} > /sys/power/resume
fi
}
|