summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-02-09 19:06:15 -0600
committerVictor Lowther <victor.lowther@gmail.com>2008-02-09 19:06:15 -0600
commiteb86a98f2778fcbc373fd2579f0f6e2c2e3007dc (patch)
treeee202f992ab31f607ed78dd5f66e7331b797591e /pm
parent7dbbc618a3e7ff83393666df3ee9289ae1d7a32d (diff)
Do not init the logfile until after we take the suspend lock.
Diffstat (limited to 'pm')
-rw-r--r--pm/functions.in4
1 files changed, 1 insertions, 3 deletions
diff --git a/pm/functions.in b/pm/functions.in
index 67764df..2ed009e 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -199,12 +199,10 @@ pm_main()
echo "System does not support $1 sleep."
return 1
}
- init_logfile "$PM_LOGFILE"
take_suspend_lock || exit 1
-
# make sure that our locks are unlocked no matter how the script exits
trap remove_suspend_lock 0
-
+ init_logfile "$PM_LOGFILE"
rm -f "$INHIBIT"
run_hooks sleep "$1" reverse "$2"