add powermanagement and disk utils

This commit is contained in:
Ertuğrul Erata
2015-07-31 10:59:10 +03:00
parent ada4e1ce08
commit 5ddcdd77d9
70 changed files with 3472 additions and 61 deletions
@@ -0,0 +1,26 @@
Index: pm-utils-1.4.1/pm/module.d/uswsusp
===================================================================
--- pm-utils-1.4.1.orig/pm/module.d/uswsusp
+++ pm-utils-1.4.1/pm/module.d/uswsusp
@@ -82,6 +82,7 @@ fi
if [ -z "$HIBERNATE_MODULE" ] && \
[ -f /sys/power/disk ] && \
grep -q disk /sys/power/state && \
+ grep -q "resume=" /proc/cmdline && \
[ -c /dev/snapshot ] &&
command_exists s2disk; then
HIBERNATE_MODULE="uswsusp"
Index: pm-utils-1.4.1/pm/pm-functions.in
===================================================================
--- pm-utils-1.4.1.orig/pm/pm-functions.in
+++ pm-utils-1.4.1/pm/pm-functions.in
@@ -306,7 +306,8 @@ fi
if [ -z "$HIBERNATE_MODULE" ] && \
[ -f /sys/power/disk ] && \
- grep -q disk /sys/power/state; then
+ grep -q disk /sys/power/state && \
+ grep -q "resume=" /proc/cmdline; then
HIBERNATE_MODULE="kernel"
do_hibernate()
{