[Pm-utils] Re: Newer version of pm-utils?

Stefan Seyfried seife at suse.de
Wed Feb 7 11:13:09 PST 2007


On Wed, Feb 07, 2007 at 05:32:30PM +0000, Richard Hughes wrote:
> On Wed, 2007-02-07 at 12:26 -0500, Peter Jones wrote:
> > On Wed, 2007-02-07 at 17:12 +0000, Richard Hughes wrote:
> > > On Wed, 2007-02-07 at 11:55 -0500, Peter Jones wrote:
> > > > Already applied this upstream.
> > > 
> > > Here's my patch... again :-)
> > > 
> > > Richard.
> > 
> > 
> > +checkproperty() {
> > +       property=$1
> > +       hal-get-property --udi /org/freedesktop/Hal/devices/computer --key $property &> /dev/null
> > +       echo $?
> > +}
> > 
> > there's no way to batch these, is there?
> 
> Well, you could use "lshal | grep power_management" and filter that, but
> it's a right bodge.

Weren't there plans to let HAL pass these hacks down in environment
variables or commandline options to pm-suspend? This would be much easier
IMO.

If this is deemed not possible, how about an extra binary, linking against
libhal or whatever is needed that can be called with

eval `get-suspend-options-from-hal-without-calling-hal-get-property-1e3-times`

and that sets some useful environment variables?

We can of course improve the name of this binary ;-)
-- 
Stefan Seyfried
QA / R&D Team Mobile Devices        |              "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg  | "Well, surrounding them's out." 


More information about the Pm-utils mailing list