[Pm-utils] [RFC] [patch review] Hook independence and security fixups, part 1

Michael Biebl mbiebl at gmail.com
Sat Feb 2 07:16:10 PST 2008

2008/2/2, Victor Lowther <victor.lowther at gmail.com>:

> Well, the conditional blocks around the current
> do_(suspend|hibernate|suspend_hybrid) are my stab at making tuxonice and
> userspace suspend support easy to implement without having to patch the
> pm-utils core.  Since (in the end), it all comes down to calling one of
> those three functions anyways, why not make them easy to override with
> whatever the distro maintainer or end user want?

I don't think we should overwrite the do_suspend/do_hibernate methods.
As I outlined in a previous mail, I'd add a
(suspend,hibernate)_method() function, that either return the value of
the (SUSPEND,HIBERNATE)_METHOD config variable or otherwise check for
tuxonice, userspace or kernel support and return a corresponding
In pm_action you would then simply call pm_suspend_$method.
The do_suspend_(tuxonice,userpace,whatever) functions could either be
defined in functions, or if you prefer to keep them separate in
functions.d/. config.d doesn't seem to be the right place for this to


Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

More information about the Pm-utils mailing list