diff -Nru pm-utils-1.4.1/debian/changelog pm-utils-1.4.1/debian/changelog --- pm-utils-1.4.1/debian/changelog 2011-04-12 04:25:09.000000000 -0700 +++ pm-utils-1.4.1/debian/changelog 2011-07-08 15:04:56.000000000 -0700 @@ -1,3 +1,11 @@ +pm-utils (1.4.1-8ubuntu1) oneiric; urgency=low + + * Add 26-inhibit-on-right-status.patch: Do not use the exit status of log + rather the exit status of the hook thereby allowing inhibit to work. + Thanks to Launchpad user Lekensteyn for the patch. (LP: #665651) + + -- Brian Murray Fri, 08 Jul 2011 15:02:58 -0700 + pm-utils (1.4.1-8) unstable; urgency=low * debian/control: Demote "kbd | console-tools" to Recommends. If KMS is diff -Nru pm-utils-1.4.1/debian/control pm-utils-1.4.1/debian/control --- pm-utils-1.4.1/debian/control 2011-04-12 04:25:09.000000000 -0700 +++ pm-utils-1.4.1/debian/control 2011-07-08 15:06:23.000000000 -0700 @@ -1,7 +1,8 @@ Source: pm-utils Section: admin Priority: optional -Maintainer: Tim Dijkstra +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Tim Dijkstra Uploaders: Michael Biebl , Martin Pitt Build-Depends: cdbs, debhelper (>= 7), xmlto Standards-Version: 3.9.1 diff -Nru pm-utils-1.4.1/debian/patches/26-inhibit-on-right-status.patch pm-utils-1.4.1/debian/patches/26-inhibit-on-right-status.patch --- pm-utils-1.4.1/debian/patches/26-inhibit-on-right-status.patch 1969-12-31 16:00:00.000000000 -0800 +++ pm-utils-1.4.1/debian/patches/26-inhibit-on-right-status.patch 2011-07-08 15:02:05.000000000 -0700 @@ -0,0 +1,23 @@ +Origin: https://launchpad.net/bugs/665651 +Description: Do not use the exit status of log rather the exit status of the hook. +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32210 +Bug-Ubuntu: https://launchpad.net/bugs/665651 + + +Index: pm-utils-1.4.1/pm/pm-functions.in +=================================================================== +--- pm-utils-1.4.1.orig/pm/pm-functions.in 2011-07-08 14:55:15.000000000 -0700 ++++ pm-utils-1.4.1/pm/pm-functions.in 2011-07-08 14:55:57.000000000 -0700 +@@ -197,9 +197,11 @@ + # rest of args passed to hook unchanged. + log "Running hook $*:" + hook_ok "$1" && "$@" ++ # log() changes the return value, so save it for later ++ local status=$? + log "" + log -n "$*: " +- hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit ++ hook_exit_status $status && LAST_HOOK="${1##*/}" || inhibit + } + + if profiling; then diff -Nru pm-utils-1.4.1/debian/patches/series pm-utils-1.4.1/debian/patches/series --- pm-utils-1.4.1/debian/patches/series 2011-04-12 04:25:09.000000000 -0700 +++ pm-utils-1.4.1/debian/patches/series 2011-07-08 14:54:43.000000000 -0700 @@ -8,3 +8,4 @@ 25-pmu.patch 80-service.patch 90-nm-proper-wakeup.patch +26-inhibit-on-right-status.patch