From 117bb5ca93de53276a1f7b7e5d485779f71b5c1f Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 27 Apr 2006 23:24:42 +0000 Subject: git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@34 880c04e9-e011-0410-abf7-b926e227c9cd --- hooks/encrypt | 4 ++++ hooks/resume | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'hooks') diff --git a/hooks/encrypt b/hooks/encrypt index 3209cf3..b42efb9 100644 --- a/hooks/encrypt +++ b/hooks/encrypt @@ -43,8 +43,12 @@ run_hook () eval "${exe}" fi } + msg "Non-LUKS encrypted device found..." + OLDIFS=$IFS; IFS=: do_oldcrypt ${crypto} + IFS=$OLDIFS + if [ $? -ne 0 ]; then err "Password verification failed, aborting..." err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip" 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 } -- cgit v1.2.3-24-g4f1b