check-for-swap-partition.patch 886 B

123456789101112131415161718192021222324252627
  1. Index: pm-utils-1.4.1/pm/module.d/uswsusp
  2. ===================================================================
  3. --- pm-utils-1.4.1.orig/pm/module.d/uswsusp
  4. +++ pm-utils-1.4.1/pm/module.d/uswsusp
  5. @@ -82,6 +82,7 @@ fi
  6. if [ -z "$HIBERNATE_MODULE" ] && \
  7. [ -f /sys/power/disk ] && \
  8. grep -q disk /sys/power/state && \
  9. + grep -q "resume=" /proc/cmdline && \
  10. [ -c /dev/snapshot ] &&
  11. command_exists s2disk; then
  12. HIBERNATE_MODULE="uswsusp"
  13. Index: pm-utils-1.4.1/pm/pm-functions.in
  14. ===================================================================
  15. --- pm-utils-1.4.1.orig/pm/pm-functions.in
  16. +++ pm-utils-1.4.1/pm/pm-functions.in
  17. @@ -306,7 +306,8 @@ fi
  18. if [ -z "$HIBERNATE_MODULE" ] && \
  19. [ -f /sys/power/disk ] && \
  20. - grep -q disk /sys/power/state; then
  21. + grep -q disk /sys/power/state && \
  22. + grep -q "resume=" /proc/cmdline; then
  23. HIBERNATE_MODULE="kernel"
  24. do_hibernate()
  25. {