summaryrefslogtreecommitdiff
path: root/pm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-03-17 12:24:04 -0500
committerVictor Lowther <victor.lowther@gmail.com>2008-03-17 12:24:04 -0500
commit5292f700d84d50e40d6690d415ba5f97b39979d4 (patch)
tree12d332a03ad7fc5361b16ccfcbaba5e02a959e6f /pm
parent1234dd9926d0f5a816a5a0728d7289dd932d87e0 (diff)
Add more logging -- log parameters and the hook blacklist.
This patch adds basic logging of our commandline parameters before and after loading the parameter overrides. It also adds logging of our initial blacklist entries.
Diffstat (limited to 'pm')
-rw-r--r--pm/pm-functions.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index 2c97848..ea57c76 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -49,6 +49,8 @@ done
. "${PM_FUNCTIONS}"
+log() { [ $LOGGING ] && echo $*; }
+
load_hook_blacklist()
{
[ -f "$PM_UTILS_ETCDIR/blacklist" ] || return
@@ -61,6 +63,7 @@ load_hook_blacklist()
# skip blank lines
[ -z "$entry" ] && continue
disablehook "${entry##*/}" "${comment:-blacklist}"
+ log "Blacklisting ${entry##*/}."
done
}
@@ -75,18 +78,15 @@ load_hook_parameters()
while read parameter; do
parameter="$(echo $parameter |sed 's,#.*$,,g')"
[ -z "$parameter" ] && continue
+ log "Adding $parameter to PM_CMDLINE."
PM_CMDLINE="${PM_CMDLINE} $parameter"
done < "$PM_UTILS_ETCDIR/parameters"
}
-log() { [ $LOGGING ] && echo $*; }
-
take_suspend_lock()
{
try_lock "pm-utils.lock" || return 1
mkdir -p "${STORAGEDIR}"
- load_hook_blacklist
- load_hook_parameters
return 0
}