summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pm/sleep.d/01grub5
-rwxr-xr-xsrc/pm-action.in4
2 files changed, 5 insertions, 4 deletions
diff --git a/pm/sleep.d/01grub b/pm/sleep.d/01grub
index 096ffa7..db1d53b 100644
--- a/pm/sleep.d/01grub
+++ b/pm/sleep.d/01grub
@@ -4,6 +4,7 @@
default_resume_kernel()
{
+ [ "$1" = "suspend" ] && return $NA
case $(uname -m) in
i?86|x86_64|athlon)
;;
@@ -25,8 +26,8 @@ default_resume_kernel()
}
case "$1" in
- hibernate|suspend_hybrid)
- default_resume_kernel
+ hibernate|suspend)
+ default_resume_kernel $2
;;
*) exit $NA
;;
diff --git a/src/pm-action.in b/src/pm-action.in
index 58a20b6..c5b560c 100755
--- a/src/pm-action.in
+++ b/src/pm-action.in
@@ -82,7 +82,7 @@ rm -f "${INHIBIT}"
# run the sleep hooks
log "$(date): Running hooks for $ACTION."
-if run_hooks sleep "$ACTION"; then
+if run_hooks sleep "$ACTION $METHOD"; then
# Sleep only if we know how and if a hook did not inhibit us.
log "$(date): performing $METHOD"
sync
@@ -93,7 +93,7 @@ else
fi
log "$(date): Running hooks for $REVERSE"
# run the sleep hooks in reverse with the wakeup action
-if run_hooks sleep "$REVERSE" reverse; then
+if run_hooks sleep "$REVERSE $METHOD" reverse; then
log "$(date): Finished."
else
exit 1