diff -Nuar pm-utils-1.4.1.orig/pm/pm-functions.in pm-utils-1.4.1/pm/pm-functions.in --- pm-utils-1.4.1.orig/pm/pm-functions.in 2011-03-27 11:01:11.219300888 +1100 +++ pm-utils-1.4.1/pm/pm-functions.in 2011-03-27 11:02:14.969300888 +1100 @@ -197,9 +197,10 @@ # rest of args passed to hook unchanged. log "Running hook $*:" hook_ok "$1" && "$@" + local status=$? log "" log -n "$*: " - hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit + hook_exit_status $status && LAST_HOOK="${1##*/}" || inhibit } if profiling; then