[PATCH] add detection of other distros and support for SUSE and ALTLinux to tools/hal-system-power-*

David Zeuthen david at fubar.dk
Wed Aug 17 19:28:00 PDT 2005


On Wed, 2005-08-17 at 10:55 +0200, Danny Kukawka wrote:
> Hi,
> 
> this patch adds dectection of more distrubutions (ALTLinux, SUSE, Mandrake, 
> Slackware, Debian and Gentoo) and adds support for powersave [1] for SUSE and 
> ALTLinux (powersave will be included to next release ALT Linux 3.0) to the 
> scripts. 

Cool, thanks a lot.. I've been wanting to announce this but the mailing
lists were down so you beat me to it!

> Please review.
> 


tools/hal-system-power-hibernate:

>  unknown_distro() {
>      echo
> org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported >&2
> +    echo unknown distro >&2
>      echo No hibernate script found >&2
>      exit 1
>  }

Should probably remove the "No hibernate script found" line.
Suggest to s/unknown distro/Unsupported Operating System/

tools/hal-system-power-set-power-save:

> +elif [ -f /etc/redhat-release ] || [ -f /etc/fedora-release ] ; then
> +    /usr/sbin/pm-hibernate
> +    RET=$?

Heh, should probably not hibernate on Red Hat systems..

tools/hal-system-power-suspend:

> unknown_distro() {
>      echo
> org.freedesktop.Hal.Device.SystemPowerManagement.NotSupported >&2
> +    echo unknown distro >&2
>      echo No hibernate script found >&2
>      exit 1
>  }

Same comment as above..

> -       alarm_not_supported
> +        alarm_not_supported

No need to add whitespace here..

With these changes I think it looks good to commit.

Cheers,
David




More information about the hal mailing list