~ubuntu-branches/ubuntu/trusty/pm-utils/trusty-updates

« back to all changes in this revision

Viewing changes to pm/pm-functions.in

  • Committer: Bazaar Package Importer
  • Author(s): Brian Murray
  • Date: 2011-07-08 15:02:58 UTC
  • Revision ID: james.westby@ubuntu.com-20110708150258-voa5s9i57d36ycj3
Tags: 1.4.1-8ubuntu1
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)

Show diffs side-by-side

added added

removed removed

Lines of Context:
197
197
        # rest of args passed to hook unchanged.
198
198
        log "Running hook $*:"
199
199
        hook_ok "$1" && "$@"
 
200
        # log() changes the return value, so save it for later
 
201
        local status=$?
200
202
        log ""
201
203
        log -n "$*: " 
202
 
        hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit
 
204
        hook_exit_status $status && LAST_HOOK="${1##*/}" || inhibit
203
205
}
204
206
 
205
207
if profiling; then