[Pm-utils] Re: Resume via quirks, not using the DBUS method, Was: Release Candidates ?

Peter Jones pjones at redhat.com
Tue Mar 6 08:26:41 PST 2007


On Tue, 2007-02-20 at 21:30 +0100, Stefan Seyfried wrote:

> Before getting towards 1.0, shouldn't we move over from /etc/ to
> /usr/lib/pm-utils or something like that to be FHS compliant? Somebody
> mentioned recently to me that having these scripts in /etc/pm/hooks seemed
> a bit strange to him. I am not very good at that FHS stuff, but IIUC only
> configuration stuff should live in /etc?

Yes, I think I agree with you.

So I'm thinking we actually want something like:

/etc/pm/config             # the default config file
/etc/pm/config.d/          # empty by default
/etc/pm/sleep.d/           # empty by default
/etc/pm/power.d/           # empty by default
/usr/lib/pm-utils/power.d/ # default power scripts are here
/usr/lib/pm-utils/sleep.d/ # default s/r/h/t scripts are here, used to be "hooks"
/usr/lib/pm-utils/bin/
/usr/lib/pm-utils/bin/pm-action
/usr/lib/pm-utils/bin/pm-pmu
/usr/lib/pm-utils/functions
/usr/sbin/pm-suspend       # symlink to pm-action above
/usr/sbin/pm-hibernate     # symlink to pm-action above
/usr/sbin/pm-powersave
/usr/bin/on_ac_power # some stuff out of pm-utils calls it...

And then for e.g. sleep.d, we take all the filenames in the two
directories (/etc/pm/sleep.d and /usr/lib/pm-utils/sleep.d) and sort
them, then we iterate.  If the file exists in /etc/pm/sleep.d, we run
that one (_if_ it's executable).  If it doesn't exist there, we run it
from /usr/lib/pm-utils/sleep.d instead.

This lets the stuff in /etc/pm, except for /etc/pm/config itself, be
totally user configuration, and lets a local admin override what
anything in the defaults will do, without changing any file the distro
distributed.

Have I missed anything terribly obvious?

-- 
  Peter



More information about the hal mailing list