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

Peter Jones pjones at redhat.com
Tue Mar 6 09:01:03 PST 2007


On Tue, 2007-03-06 at 16:31 +0000, Richard Hughes wrote:
> On 06/03/07, Peter Jones <pjones at redhat.com> 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.

I find myself wondering if /etc/pm/config shouldn't really
be /usr/lib/pm-utils/config , actually.  That would make /etc/pm
entirely the domain of the admin (and any ISV software he adds)

I'd say the distros should be using /usr/lib/pm-utils/*/ instead,
though.  If you think about it, they're basically acting as a proxy for
us at fd.o.  Which is to say, in some respect we're sharing one task
with them, whereas a 3rd party package vendor (such as freshrpms, for
example) is really doing things on behalf of the admin, rather than as a
vendor.

> > /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.

Not just fd.o, but a slightly more abstract concept of "the system
vendor".  fd.o and {Fedora/Novell/SLS/etc} are really working together
to provide /usr/lib/pm-utils/sleep.d stuff, but the admin and software
he adds put things in /etc/pm/sleep.d/ .  

> > /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?

I'd really rather maintain one 114 line script that has a special case
that winds up being 5 lines for each (of two) choices than two 100 line
scripts that have 95 lines the same.

-- 
  Peter



More information about the hal mailing list