From 8fd8b1c7ff0a82c876d58106e904d1e6f6716db5 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 27 Apr 2006 23:31:05 +0000 Subject: git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@35 880c04e9-e011-0410-abf7-b926e227c9cd --- hooks/encrypt | 4 ++-- hooks/resume | 17 +++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'hooks') diff --git a/hooks/encrypt b/hooks/encrypt index b42efb9..4992270 100644 --- a/hooks/encrypt +++ b/hooks/encrypt @@ -50,8 +50,8 @@ run_hook () IFS=$OLDIFS if [ $? -ne 0 ]; then - err "Password verification failed, aborting..." - err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip" + err "Non-LUKS device decryption failed. verify format: " + err " crypto=hash:cipher:keysize:offset:skip" exit 1 else if [ -e "/dev/mapper/root" ]; then diff --git a/hooks/resume b/hooks/resume index 649b992..a5dee6e 100644 --- a/hooks/resume +++ b/hooks/resume @@ -3,15 +3,12 @@ run_hook () { fmtdevice () { echo "${1}:${2}"; } - if [ -e "/sys/power/resume" ]; then - if [ -e "${resume}" ]; then - dev_t=$( /bin/parseblock "${resume}" ) - fmtdevice ${dev_t} > /sys/power/resume - fi - - if [ -e "/proc/suspend2" ]; then - echo "" > /proc/suspend2/do_resume - echo ${resume2} > /proc/suspend2/resume2 - fi + if [ -e "/sys/power/resume" -a -e "${resume}" ]; then + dev_t=$( /bin/parseblock "${resume}" ) + fmtdevice ${dev_t} > /sys/power/resume + fi + if [ -e "/proc/suspend2" -a "x${resume2}" != "x" ]; then + echo ${resume2} > /proc/suspend2/resume2 + echo "" > /proc/suspend2/do_resume fi } -- cgit v1.2.3-24-g4f1b