On 06/03/07, Peter Jones <[EMAIL PROTECTED]> wrote:
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
Adding that this is where the ISV's and distros should push random stuff.
/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"
Yes, adding that anything installed here is installed by the fd.o
pm-utils project only.
/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
Can't we just get rid of the symlink and install two files rather than
one with special casing that changes the execution depending on the
symlink name?
/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?
That sounds like a plan to me. :-)
Richard.
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils