Created attachment 40891 patch for pm-functions.in
Since 1.4.0, _run_hook calls a log() after running the hook, and thus loses the hook exit status:
199 hook_ok "$1" && "$@" 200 log "" 201 log -n "$*: " 202 hook_exit_status $? && LAST_HOOK="${1##*/}" || inhibit
I attached a simple patch that seems to fix it.
This is important because e.g. a script that unmounts SD/MMC cards before suspending cannot inhibit it if the card is busy (see https://help.ubuntu.com/community/AspireOne/Ubuntu9.10?action=recall&rev=69).
Regards, Ariel
Created attachment 40891
patch for pm-functions.in
Since 1.4.0, _run_hook calls a log() after running the hook, and thus loses the hook exit status:
199 hook_ok "$1" && "$@" "${1##* /}" || inhibit
200 log ""
201 log -n "$*: "
202 hook_exit_status $? && LAST_HOOK=
I attached a simple patch that seems to fix it.
This is important because e.g. a script that unmounts SD/MMC cards before suspending cannot inhibit it if the card is busy (see https:/ /help.ubuntu. com/community/ AspireOne/ Ubuntu9. 10?action= recall& rev=69).
Regards,
Ariel