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

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