[Pm-utils] [PATCH 04/12] Change the default blacklist location to PM_SYSCONFDIR.
Victor Lowther
victor.lowther at gmail.com
Tue Mar 11 18:08:35 PDT 2008
Also add before_hooks support to run_hooks.
This is not where the fix mentioned in the previous patch is applied.
---
pm/pm-functions.in | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index 5014ee2..cd666b0 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -48,13 +48,14 @@ done
. "${PM_FUNCTIONS}"
-[ -f "$PM_UTILS_LIBDIR/blacklist" ] && {
+[ -f "$PM_UTILS_SYSCONFDIR/blacklist" ] && {
# loop through the blacklist file, adding entries to our hook blacklist.
# Blacklist file format:
# name debugging text
# Comments begin with hash signs.
- sed 's,#.*$,,g' < "$PM_UTILS_LIBDIR/blacklist" | \
+ sed 's,#.*$,,g' < "$PM_UTILS_SYSCONFDIR/blacklist" | \
while read entry comment; do
+ # skip blank lines
[ -z "$entry" ] && continue
disablehook "${entry##*/}" "${comment:-blacklist}"
done
@@ -101,6 +102,7 @@ run_hooks() {
# Currently only power and sleep are meaningful.
local syshooks="${PM_UTILS_ETCDIR}/$1.d"
local phooks="${PM_UTILS_LIBDIR}/$1.d"
+ command_exists before_hooks && before_hooks
local sort="sort"
local base
local hook
--
1.5.4.3
More information about the Pm-utils
mailing list