[Pm-utils] Making cron run after resume?
ncunningham at crca.org.au
Sat May 10 16:42:07 PDT 2008
On Sat, 2008-05-10 at 08:13 -0500, Victor Lowther wrote:
> 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.
That's confusing. I'd suggest that either hooks without two leading
digits don't get run, or all hooks get run in C-local lexical sort
I'd also argue that result codes should be consistently treated. Ignore
them all or don't ignore them at all. It's not hard to make a script
return "I succeeded" if some failure shouldn't result in aborting. I'm
not sure what the current behaviour is. Perhaps I could have just said
"I agree with Stefan".
More information about the Pm-utils