[Pm-utils] Making cron run after resume?
victor.lowther at gmail.com
Sat May 10 06:13:32 PDT 2008
On Thu, 2008-05-08 at 18:16 -0500, Victor Lowther wrote:
> On Thu, 2008-05-08 at 16:17 +0200, Michael Biebl wrote:
> > 2008/5/8 Richard Hughes <hughsient at gmail.com>:
> > > In reference to
> > > this: https://bugzilla.redhat.com/show_bug.cgi?id=445603
> > >
> > > Should we be kicking cron a resume time to do the stuff we should have
> > > done whilst suspended?
> > See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469135
> > (a user request to run anacron on resume and AC plug).
> > Imho we should only kick anacron on resume if we are plugged on AC.
> > It would probably also make sense to kick anacron on AC plug events.
> Seems like a good hook to put in the anacron package.
How about the following hook-running convention:
When running hooks in normal sort order, hooks shall run in two phases:
Phase 1: All hooks that DO NOT begin with two leading digits shall run
first (in no guaranteed order), and the success or failure of these
hooks SHALL be ignored by the pm-utils framework.
Phase 2: All hooks that DO begin with two leading digits shall run
second (in C-locale lexical sort order), and unexpected failure of these
hooks SHALL prevent pm-utils from suspending or hibernating the box.
When running hooks in reverse order, the order of the above two phases
shall be inverted, and Phase 2 hooks shall run in reverse lexical sort
This neatly seperates out hooks that are run because an installed
program wants to do something automatically across a suspend/resume (but
that do not work around glitches that may cause suspend/resume to fail),
and hooks that must be run in a specific order to work around glitches
that may cause suspend to fail.
> > Cheers,
> > Michael
Ubuntu Certified Professional
More information about the Pm-utils