Blame SOURCES/pm-utils-1.4.1-hook-exit-code-log.patch

ef56e5
diff -up pm-utils-1.4.1/pm/pm-functions.in.orig pm-utils-1.4.1/pm/pm-functions.in
ef56e5
--- pm-utils-1.4.1/pm/pm-functions.in.orig	2011-08-22 14:52:58.976213050 +0200
ef56e5
+++ pm-utils-1.4.1/pm/pm-functions.in	2011-08-22 14:57:26.000000000 +0200
ef56e5
@@ -195,11 +195,13 @@ hook_ok()
ef56e5
 _run_hook() {
ef56e5
 	# $1 = hook to run
ef56e5
 	# rest of args passed to hook unchanged.
ef56e5
+	local hook_status
ef56e5
 	log "Running hook $*:"
ef56e5
 	hook_ok "$1" && "$@"
ef56e5
+	hook_status=$?
ef56e5
 	log ""
ef56e5
-	log -n "$*: " 
ef56e5
-	hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit
ef56e5
+	log -n "$*: "
ef56e5
+	hook_exit_status $hook_status && LAST_HOOK="${1##*/}" || inhibit
ef56e5
 }
ef56e5
 
ef56e5
 if profiling; then