Be a little smart about it, and allow comments.

Yes, I know this code is incorrect.  It is fixed later on on the patch series.
---
 pm/pm-functions.in |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index 76e8845..5014ee2 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -48,6 +48,18 @@ done
 
 . "${PM_FUNCTIONS}"
 
+[ -f "$PM_UTILS_LIBDIR/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" | \
+       while read entry comment; do
+               [ -z "$entry" ] && continue
+               disablehook "${entry##*/}" "${comment:-blacklist}"
+       done
+}
+
 take_suspend_lock()
 {
        VT=$(fgconsole)
-- 
1.5.4.3

_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to