[Pm-utils] [PATCH 02/17] Do not init the logfile until after we take the suspend lock.

Victor Lowther victor.lowther at gmail.com
Sat Feb 9 18:31:06 PST 2008


---
 pm/functions.in |    4 +---
 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"
-- 
1.5.3.8



More information about the Pm-utils mailing list