[Patches] Script bugs and hibernate on pmu

Richard Hughes hughsient at gmail.com
Sun Feb 19 16:14:27 PST 2006


On Mon, 2006-02-20 at 00:55 +0100, Sjoerd Simons wrote:
> Hi,
> 
>   Two patches this time: 
>   
>   The first (05_pmu_nohibernate.patch) is a little bit of a hack. When deciding
>   if a system can suspend/hibernate it overrides the info it got from
>   /sys/power/state if on an pmu system. On my powerbook using /sys/power/* only
>   result in crashes. 
> 
>   The second fixes various things in various hal scripts. I've only fixed
>   hal-system-lcd-* and hal-system-power-*, because i actually use those and
>   could test them. Anyway summary of the changes:
>     * When checking for an empty string use [ -z  "$x" ] instead of 
>       [ "$x" == "" ]
>     * The string compare operate is = not ==, while this works with bash it
>       doesn't on other shells (notably dash)
>     * Fix missing quoting in some places
>     * hal-system-lcd-set-brightness
>       + Check if the level value is allowed before doing the pmu brightness
>         action. 
>     * hal-system-power-hibernate
>       + Disable the usage of /sys/power/state on pmu systems 
>     * hal-system-power-suspend
>       + Use $HAL_PROP_POWER_MANAGEMENT_TYPE instead of
>         $HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD to check if it's run on a pmu 
>         system
>       + Call hal-system-power-pmu only as fallback if there are no other
>         scripts that can do suspend are installed
>       + Sent org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported if
>         any of the suspend scripts/methods failed, not just for the pmu 
> 
>  
>   The good news is that gnome-power-manager is now working nicely on my
>   powerbook. So a hal and gnome-power-manager that work nicely together should
>   be in debian experiment RSN.

These all look good to me. Thanks Sjoerd!

Richard.



More information about the hal mailing list