[Pm-utils] Move pm/functions and hooks to /usr/lib or /usr/share

Michael Biebl mbiebl at gmail.com
Fri Mar 9 08:32:22 PST 2007


2007/3/9, Stefan Seyfried <seife at suse.de>:

>
> On Tue, Mar 06, 2007 at 12:37:13AM +0100, Holger Macht wrote:
> > On Tue 06. Mar - 00:21:56, Michael Biebl wrote:
> > > The problem about the hooks is, that they are activated/deactivated
> > > via the x-bit. It would be a bit odd to have to change the x bit of a
> > > file in /usr/lib/pm.
> > >
> > > Maybe using symlinks would be a better idea anyway, similar to /etc/init.d
> >
> > I think this sounds reasonable. Something like a symlink from
> > /etc/pm/hooks to /usr/lib/pm/hooks or the like?
>
> no, more like:
>
> /etc/pm/{hooks,sleep.d}/ having links
> 01foo -> /usr/lib/pm/hooks/foo
> 05bar -> /usr/lib/pm/hooks/bar
> 99baz -> /usr/lib/pm/hooks/baz
>
> So you add a link -> enable the hook
> rm the link -> disable the hook
>
> It is even more intuitive than the "set the x bit to enable, remove it to
> disable" IMO.

Completely agree.

My only complaint would be, /etc/pm/power.d/ and /usr/lib/pm-utils/power.d/.
I'd rather call them functions.d.
power.d and sleep.d are just to similar to make it easy to guess what
their purpose is.

Cheers,
Michael


More information about the Pm-utils mailing list