summaryrefslogtreecommitdiffstats
path: root/hooks/resume
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-04-28 01:24:42 +0200
committerAaron Griffin <aaron@archlinux.org>2006-04-28 01:24:42 +0200
commit117bb5ca93de53276a1f7b7e5d485779f71b5c1f (patch)
tree0497ecdb5025be10d16c0f7e175b35b1d973e946 /hooks/resume
parenta102395a7ef970a91ee188f2c0de3b1dc15ca09c (diff)
downloadmkinitcpio-117bb5ca93de53276a1f7b7e5d485779f71b5c1f.tar.gz
mkinitcpio-117bb5ca93de53276a1f7b7e5d485779f71b5c1f.tar.xz
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@34 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'hooks/resume')
-rw-r--r--hooks/resume8
1 files changed, 6 insertions, 2 deletions
diff --git a/hooks/resume b/hooks/resume
index bec926e..649b992 100644
--- a/hooks/resume
+++ b/hooks/resume
@@ -1,13 +1,17 @@
# vim:set ft=sh:
+# TODO encrypted swap partition if resume2 begins with 'swap:'
run_hook ()
{
fmtdevice () { echo "${1}:${2}"; }
- if [ -e /sys/power/resume ]; then
+ if [ -e "/sys/power/resume" ]; then
if [ -e "${resume}" ]; then
dev_t=$( /bin/parseblock "${resume}" )
fmtdevice ${dev_t} > /sys/power/resume
fi
- [ -e /proc/suspend2 ] && echo "" > /proc/suspend2/do_resume
+ if [ -e "/proc/suspend2" ]; then
+ echo "" > /proc/suspend2/do_resume
+ echo ${resume2} > /proc/suspend2/resume2
+ fi
fi
}