Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- /usr/sbin/pm-suspend 2016-05-16 18:59:01.623376619 +0200
- +++ /usr/sbin/pm-suspend 2016-05-16 19:03:43.420630720 +0200
- @@ -68,6 +68,10 @@
- while [ $# -gt 0 ]
- do
- [ "$1" = "--help" ] && help
- + [ "$1" = "--direct" ] && {
- + shift
- + DO_DIRECT="$1"
- + }
- shift
- done
- @@ -95,16 +99,19 @@
- load_hook_parameters
- # run the sleep hooks
- +[ "${DO_DIRECT}" != "false" ] && {
- log "$(date): Running hooks for $ACTION."
- if run_hooks sleep "$ACTION $METHOD"; then
- # Sleep only if we know how and if a hook did not inhibit us.
- log "$(date): performing $METHOD"
- sync
- - "do_$METHOD" || r=128
- + [ -z "${DO_DIRECT}" ] && "do_$METHOD" || r=128
- log "$(date): Awake."
- else
- log "$(date): Inhibit found, will not perform $METHOD"
- fi
- +}
- +[ "${DO_DIRECT}" = "true" ] && exit $r
- log "$(date): Running hooks for $REVERSE"
- # run the sleep hooks in reverse with the wakeup action
- if run_hooks sleep "$REVERSE $METHOD" reverse; then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement