From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by nuthatch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-51154-garchives=archives.gentoo.org@gentoo.org>)
	id 1GOXTv-0007c6-3m
	for garchives@archives.gentoo.org; Sat, 16 Sep 2006 10:33:07 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k8GAVR1J030507;
	Sat, 16 Sep 2006 10:31:27 GMT
Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187])
	by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k8GAN1rw008994
	for <gentoo-user@lists.gentoo.org>; Sat, 16 Sep 2006 10:23:01 GMT
Received: by nf-out-0910.google.com with SMTP id p46so3106555nfa
        for <gentoo-user@lists.gentoo.org>; Sat, 16 Sep 2006 03:23:01 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:from:reply-to:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:message-id;
        b=o1r5Bt90f1bqF54RO+ZmaBBp4Sh71bsFjAtj90pkjXTqZg+QKH7jtnriUWKWys4ZFfzAgoNxMN6DftmJ1/XMMKPs5ffcV8nPnJO66tGddtp7lYCQMNza8Sdk4+v7gFQ6FmnK6PKMvtz8/wlGdgxNd9SIg2G0Ub8SK8J5booQsAY=
Received: by 10.78.182.20 with SMTP id e20mr2291439huf;
        Sat, 16 Sep 2006 03:23:00 -0700 (PDT)
Received: from ?192.168.0.5? ( [213.162.120.196])
        by mx.gmail.com with ESMTP id 30sm10160687hub.2006.09.16.03.22.58;
        Sat, 16 Sep 2006 03:23:00 -0700 (PDT)
From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Power butten
Date: Sat, 16 Sep 2006 11:25:25 +0100
User-Agent: KMail/1.9.1
References: <200609141817.16902.gentoo@kd4ccd.dynalias.org> <200609152336.11822.michaelkintzios@gmail.com> <7573e9640609151653t28bcebffod6c2039a2f51ab67@mail.gmail.com>
In-Reply-To: <7573e9640609151653t28bcebffod6c2039a2f51ab67@mail.gmail.com>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: multipart/signed;
  boundary="nextPart1874446.EJ8KCL7thZ";
  protocol="application/pgp-signature";
  micalg=pgp-sha1
Content-Transfer-Encoding: 7bit
Message-Id: <200609161125.43381.michaelkintzios@gmail.com>
X-Archives-Salt: 446a62fe-fa93-413e-bb26-1a0cd52c07c8
X-Archives-Hash: 2398f8a1bf06bdbbcfca8796e8a2c8d5

--nextPart1874446.EJ8KCL7thZ
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Saturday 16 September 2006 00:53, Richard Fish wrote:

> You need to add a "sleep" case here to do whatever you want to happen
> when you press the pwer button...

Thanks Richard,

I have added this:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
case "$group" in
        button)
                case "$action" in
                        power)
                                /sbin/init 0
                                ;;
                        sleep)
                                /usr/sbin/hibernate
                                ;;

                        # if your laptop doesnt turn on/off the display via=
=20
hardware
                        # switch and instead just generates an acpi event, =
you=20
can force
                        # X to turn off the display via dpms.  note you wil=
l=20
have to run
                        # 'xhost +local:0' so root can access the X DISPLAY.
                        #lid)
                        #       xset dpms force off
                        #       ;;

                        *)      log_unhandled $* ;;
                esac
                ;;

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

and it now hibernates nicely.  I have another acpi event question, but I'll=
=20
start a new thread for it since it is not relevant.

I hope my question and answers I received have satisfied the OP requirement=
s=20
too.
=2D-=20
Regards,
Mick

--nextPart1874446.EJ8KCL7thZ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBFC9En5Fp0QerLYPcRAredAJ99rhUul4V0xRL8V5t+fPZTSVopDACgxTSi
jyKAmD0HvBw5NBgd9VKh630=
=l583
-----END PGP SIGNATURE-----

--nextPart1874446.EJ8KCL7thZ--
-- 
gentoo-user@gentoo.org mailing list