Hello community, here is the log from the commit of package pm-utils checked in at Fri Sep 26 15:08:21 CEST 2008. -------- --- pm-utils/pm-utils.changes 2008-09-24 21:12:05.000000000 +0200 +++ /mounts/work_src_done/STABLE/pm-utils/pm-utils.changes 2008-09-26 12:42:15.000000000 +0200 @@ -1,0 +2,5 @@ +Fri Sep 26 12:41:31 CEST 2008 - seife@suse.de + +- fix pm-action and functions for suspend-hybrid + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pm-utils.spec ++++++ --- /var/tmp/diff_new_pack.u16550/_old 2008-09-26 15:08:02.000000000 +0200 +++ /var/tmp/diff_new_pack.u16550/_new 2008-09-26 15:08:02.000000000 +0200 @@ -21,7 +21,7 @@ Name: pm-utils Url: http://webcvs.freedesktop.org/pm-utils/ Version: 0.99.4.20071229 -Release: 1 +Release: 2 %define pm_utils_suse_version 20080924 Summary: Tools to suspend and hibernate computers License: GPL v2 or later @@ -106,6 +106,8 @@ %ghost %verify(not md5 size mtime) /var/log/pm-suspend.log %changelog +* Fri Sep 26 2008 seife@suse.de +- fix pm-action and functions for suspend-hybrid * Wed Sep 24 2008 seife@suse.de - update the tarball to the latest 0.99.4 upstream CVS which includes: ++++++ pm-utils-0.99.4-uswsusp-support.diff ++++++ --- /var/tmp/diff_new_pack.u16550/_old 2008-09-26 15:08:02.000000000 +0200 +++ /var/tmp/diff_new_pack.u16550/_new 2008-09-26 15:08:02.000000000 +0200 @@ -15,7 +15,49 @@ [ -f /usr/lib/pm-utils/defaults ] && . /usr/lib/pm-utils/defaults set +a -@@ -121,26 +123,76 @@ get_power_status() +@@ -73,35 +75,36 @@ find_sleepd_files() + done + } + + run_hooks() + { ++ # $1=suspend/suspend_hybrid/hibernate $2=suspend/hibernate/thaw/resume $3=reverse/"" + [ -z "$1" ] && return 0 + + [ -f /var/run/pm-suspend ] && . /var/run/pm-suspend + rm -f /var/run/pm-suspend + +- echo "$(date): running $1 hooks." ++ echo "$(date): running '$1'/'$2'/'$3' hooks." + + files=$(find_sleepd_files) +- if [ "$2" = "reverse" ]; then ++ if [ "$3" = "reverse" ]; then + filea=($files) + filen=${#filea[*]} + while [ "$filen" -gt 0 ]; do + let filen-- + file="${filea[$filen]}" + echo "===== $(date): running hook: $file =====" +- $file $1 ++ $file $2 $1 + done + else + for file in $files ; do + echo "===== $(date): running hook: $file =====" +- $file $1 ++ $file $2 $1 + done + fi + +- echo "$(date): done running $1 hooks." ++ echo "$(date): done running $1/$2 hooks." + } + + get_power_status() + { + RETVAL=0 +@@ -121,45 +124,96 @@ get_power_status() return $RETVAL } @@ -96,8 +138,10 @@ fi take_suspend_lock || exit 1 -@@ -149,17 +201,18 @@ pm_main() - run_hooks "$1" + rm -f "$INHIBIT" + +- run_hooks "$1" ++ run_hooks "$1" "$2" if [ ! -e "$INHIBIT" -a "$(type -t "do_$1")" == "function" ]; then sync ; sync ; sync @@ -105,7 +149,8 @@ + RET=$? fi - run_hooks "$2" reverse +- run_hooks "$2" reverse ++ run_hooks "$1" "$3" reverse remove_suspend_lock 200 @@ -137,3 +182,44 @@ help_options ;; *) +Index: b/src/pm-action +=================================================================== +--- a/src/pm-action ++++ b/src/pm-action +@@ -92,10 +92,11 @@ done + + + ACTION=$(basename "$0") + ACTION=${ACTION#pm-} + ACTION=${ACTION/-/_} ++METHOD=$ACTION + + case "$ACTION" in + suspend) + if ! grep -q mem /sys/power/state ; then + echo "Error: kernel cannot suspend to ram." 1>&2 +@@ -107,15 +108,23 @@ case "$ACTION" in + echo "Error: kernel cannot suspend to disk." 1>&2 + exit 1 + fi + REVERSE=thaw + ;; ++ suspend_hybrid) ++ if ! pm-is-supported --suspend-hybrid; then ++ echo "Error: system cannot do hybrid suspend." 1>&2 ++ exit 1 ++ fi ++ ACTION=suspend ++ REVERSE=resume ++ ;; + *) + exit 1 + ;; + esac + + export PM_CMDLINE="$@" + +-pm_main "$ACTION" "$REVERSE" ++pm_main "$METHOD" "$ACTION" "$REVERSE" + + exit $? ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de