[Pm-utils] [PATCH] Load hook blacklist for power.d hooks

Dan Nicholson dbn.lists at gmail.com
Sat Mar 20 10:50:06 PDT 2010


On Fri, Mar 19, 2010 at 7:25 PM, Chase Douglas <chase.douglas at ubuntu.com> wrote:
> On Fri, Mar 19, 2010 at 5:45 PM, Dan Nicholson <dbn.lists at gmail.com> wrote:
>> On Fri, Mar 19, 2010 at 2:36 PM, Chase Douglas <chase.douglas at ubuntu.com> wrote:
>>> From: Chase Douglas <chase.douglas at canonical.com>
>>>
>>> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
>>> ---
>>>  src/pm-powersave.in |    2 ++
>>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/src/pm-powersave.in b/src/pm-powersave.in
>>> index dff1f64..08e4f5b 100644
>>> --- a/src/pm-powersave.in
>>> +++ b/src/pm-powersave.in
>>> @@ -38,6 +38,8 @@ trap remove_powersave_lock 0
>>>  mkdir -p "${STORAGEDIR}"
>>>  rm -f "${INHIBIT}"
>>>
>>> +load_hook_blacklist
>>> +
>>>  if [ "$1" = "true" -o "$1" = "false" ] ; then
>>>        init_logfile "${PM_LOGFILE}"
>>>        run_hooks power "$1"
>>
>> Seems reasonable. Does pm-utils complain if you have a sleep.d hook in
>> HOOK_BLACKLIST but you're running power.d hooks?
>>
>> Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
>
> Based on what I've seen in the code, it will just not worry about it.
> Right before each script is run (for any action or powersave), it is
> checked for whether it's executable or disabled, and if so it doesn't
> run it. So a sleep.d hook will never check for whether a power.d hook
> is enabled, so there shouldn't be any extra output.

I think you're right. Applied.

--
Dan


More information about the Pm-utils mailing list