Hiyas, here are two patches,
the first makes it possible to use a different hibernate mode, valid modes are according to Documentation/power/interface.txt platform shutdown reboot testproc test The second one moves the setting of LC_COLLATE from pm-action to functions, to make sure that it is always set to "C" when functions is sourced. Regards, Till
This patch makes it possible to use a different hibernate mode, valid modes are according to Documentation/power/interface.txt platform shutdown reboot testproc test Author: Till Maas <opensource till name> License: same as pm-utils Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=375701 diff --git a/pm/functions b/pm/functions index 39872e3..6ce849c 100755 --- a/pm/functions +++ b/pm/functions @@ -10,6 +10,7 @@ export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/pm-utils/bin # RESUME_MODULES # set -a +HIBERNATE_MODE="platform" HIBERNATE_RESUME_POST_VIDEO=no INHIBIT=/var/run/pm-utils.inhibit PM_LOGFILE=${PM_LOGFILE:=/var/log/pm-suspend.log} @@ -128,7 +129,7 @@ do_suspend() do_hibernate() { - echo -n "platform" > /sys/power/disk + echo -n "${HIBERNATE_MODE}" > /sys/power/disk echo -n "disk" > /sys/power/state }
Set the sort order in functions instead of pm-action.
Author: Till Maas
License: same as pm-utils
diff --git a/pm/functions b/pm/functions
index 39872e3..ec71f78 100755
--- a/pm/functions
+++ b/pm/functions
@@ -16,6 +16,9 @@ PM_LOGFILE=${PM_LOGFILE:=/var/log/pm-suspend.log}
SUSPEND_MODULES=""
TEMPORARY_CPUFREQ_GOVERNOR="userspace"
+# Use c sort order
+export LC_COLLATE=C
+
[ -f /usr/lib/pm-utils/defaults ] && . /usr/lib/pm-utils/defaults
set +a
diff --git a/src/pm-action b/src/pm-action
index b1ee70f..7c2643b 100755
--- a/src/pm-action
+++ b/src/pm-action
@@ -51,8 +51,6 @@ if [ -n "$EUID" -a "$EUID" != "0" ]; then
exit 1
fi
-export LC_COLLATE=C
-
# Get the command line options
while [ $# -gt 0 ]
do
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Pm-utils mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pm-utils
