diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-03-01 18:27:36 -0600 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2008-03-01 18:27:36 -0600 |
commit | 76dd8d91365b0c5e85cd6d494c7a5e2b3c27235b (patch) | |
tree | a9d6cff89f0b0d8202270ddf899800f2bb60492f /src | |
parent | 9022cb6113a910ae559cbb3a3833f07107df400d (diff) |
Fixed up merge errors merging back with master.
Diffstat (limited to 'src')
-rw-r--r-- | src/pm-action.in | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pm-action.in b/src/pm-action.in index 787ad01..7090b57 100644 --- a/src/pm-action.in +++ b/src/pm-action.in @@ -100,11 +100,13 @@ esac export PM_CMDLINE="$@" +"check_$ACTION" || { echo "System does not support $ACTION sleep."; exit 1; } + take_suspend_lock || exit 1 # make sure we release the lock no matter how we exit trap remove_suspend_lock 0 init_logfile "${PM_LOGFILE}" rm -f "${INHIBIT}" run_hooks sleep "$ACTION" -"do_$ACTION" -reverse "$REVERSE" +command_exists "do_$ACTION" && [ ! -e "$INHIBIT" ] && { sync; "do_$ACTION"; } +run_hooks sleep "$REVERSE" reverse |