Defining them just in the get_foo_hooks functions
does not do The Right THing, sadly.
---
 pm/pm-functions.in |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index 3efe5d9..d99809d 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -157,8 +157,6 @@ hook_ok()
 
 get_core_hooks() 
 {
-       local syshooks="${PM_UTILS_ETCDIR}/$1.d"
-       local phooks="${PM_UTILS_LIBDIR}/$1.d"
        local sort="sort"
        [ "$2" = "reverse" ] && sort="sort -r"
        for f in "$syshooks/"[0-9][0-9]*[!~] "$phooks/"[0-9][0-9]*[!~]; 
@@ -167,8 +165,6 @@ get_core_hooks()
 
 get_aux_hooks() 
 {
-       local syshooks="${PM_UTILS_ETCDIR}/$1.d"
-       local phooks="${PM_UTILS_LIBDIR}/$1.d"
        local sort="sort"
        [ "$2" = "reverse" ] && sort="sort -r"
        for f in "$syshooks/"[!0-9][!0-9]*[!~] "$phooks/"[!0-9][!0-9]*[!~]; 
@@ -181,6 +177,8 @@ run_some_hooks()
        # $2 = core or aux hook?
        # $3 = order to sort hooks in
        # rest are parameters for hooks
+       syshooks="${PM_UTILS_ETCDIR}/$1.d"
+       phooks="${PM_UTILS_LIBDIR}/$1.d"
        local hook_type="$1"
        local hook_coa="$2"
        local hook_order="$3"
-- 
1.5.4.3

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

Reply via email to