[gpm] Re: No hibernate/suspend script found

Richard Hughes hughsient at gmail.com
Mon Sep 5 03:29:29 PDT 2005


cc-ing hal m/l.

On Mon, 2005-09-05 at 15:43 +0800, Ow Mun Heng wrote: 
> On Wed, 2005-08-31 at 21:08 +0100, Richard Hughes wrote:
> > On Wed, 2005-08-31 at 21:42 +0200, Joris Vuffray wrote:
> > > I'm using a custom function which I included in my /etc/acpi/default.sh
> > > script, it reacts to acpi calls.
> > > The function is using the /usr/sbin/hibernate command which is included
> > > in the "sys-power/hibernate-script" Gentoo ebuild to hibernate. (Which
> > > is the http://www.suspend2.net/ hibernate script). 
> > 
> > Is /usr/bin/hibernate the default for gentoo? What flags do you use?
> 
> Ahah!! My favourite topic!! Gentoo!! hehe..
> 
> Richard, hibernate-script is the scripts used by suspend2 as an optional
> inclusion to using software_suspend2 (I've told you about this a long
> time ago when you asked me to write scripts to do hibernation)

Sure, sorry, been at the back of my mind.

> /usr/sbin/hibernate is the default only if the user chooses to install
> it. (nothing is default in Gentoo. It's a source based distro after
> all!)

Point.

> How do you check if /usr/sbin/hibernate exists?  Do what you do,
> 
> if [ -f /etc/altlinux-release ] ; then
>     if [ -x /usr/bin/powersave ] ; then
>         /usr/bin/powersave --suspend-to-disk
>         RET=$?
> +   elif [ -x /usr/sbin/hibernate ] ; then
> +	/usr/sbin/hibernate --force
> +	RET=$?
>     else
>         # TODO: add support
>         unsupported
>     fi
> 
> Just check if the script exists and then do the hibernate :-)

What about the attached? David what's your take on this?

Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-add-suspend2.patch
Type: text/x-patch
Size: 2932 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050905/4a65225a/hal-add-suspend2.bin


More information about the hal mailing list