hal-system-power-* scripts

Richard Hughes hughsient at gmail.com
Mon Sep 26 08:15:44 PDT 2005


On Mon, 2005-09-26 at 10:34 -0400, David Zeuthen wrote:
> On Wed, 2005-09-21 at 22:08 +0100, Richard Hughes wrote:
> > Okay, What about the attached patch, that does exactly that..
> 
> I think you need to enclose the "#Other distros just need to have *any*
> tools installed" in it's own elif / fi block, right?
> 
> So it will look like this
> 
> if [ -f "/etc/altlinux-release" ] || [ -f "/etc/SuSE-release" ] ; then
>   ...
> elif [ -f "/etc/redhat-release" ] || [ -f "/etc/fedora-release" ] ; then
>   ...
> elif
>   #Other distros just need to have *any* tools installed
>   if [ -x "/usr/bin/powersave" ] ; then
>   ...
> fi

Well, yes and no. It makes it clearer, but the way I read my code, it
only does the "elif [ -x "/usr/bin/powersave" ]" line if the "elif
[ -f /etc/redhat-release ] || [ -f /etc/fedora-release ] ; then" line
falls thru.

I guess either works.

New files attached to do it your way (diff doesn't make it clear).

Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-system-power-hibernate
Type: application/x-shellscript
Size: 1152 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050926/de2b8849/hal-system-power-hibernate.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-system-power-set-power-save
Type: application/x-shellscript
Size: 894 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050926/de2b8849/hal-system-power-set-power-save.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-system-power-suspend
Type: application/x-shellscript
Size: 1485 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050926/de2b8849/hal-system-power-suspend.bin


More information about the hal mailing list