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

Danny Kukawka danny.kukawka at web.de
Wed Aug 17 20:41:55 PDT 2005


On Thursday 18 August 2005 04:28, David Zeuthen wrote:
> 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!

;-))

I don't see currently a way to detect Ubuntu, since they not provides a 
special *-release or *-version. They provides only a debian file. If there is 
anyone with contact to Ubuntu: I don't know why they don't provide such a 
file, but they should. ;)

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

o.k.

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

This was your code ;-) I add this only to fedora. o.k.?

> With these changes I think it looks good to commit.

I commit the patch with this changes.

Cheers,

Danny


More information about the hal mailing list