From owner-freebsd-current@FreeBSD.ORG Fri Dec 22 11:58:18 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2976116A403 for ; Fri, 22 Dec 2006 11:58:18 +0000 (UTC) (envelope-from andy@siliconlandmark.com) Received: from lexi.siliconlandmark.com (lexi.siliconlandmark.com [209.69.98.4]) by mx1.freebsd.org (Postfix) with ESMTP id D5D2413C45D for ; Fri, 22 Dec 2006 11:58:17 +0000 (UTC) (envelope-from andy@siliconlandmark.com) Received: from [10.0.1.9] (cpe-24-33-245-212.twmi.res.rr.com [24.33.245.212]) by lexi.siliconlandmark.com (8.13.3/8.13.3) with ESMTP id kBMBlYZ5024406; Fri, 22 Dec 2006 06:47:34 -0500 (EST) (envelope-from andy@siliconlandmark.com) In-Reply-To: <20061221121828.GE98504@egr.msu.edu> References: <20061221121828.GE98504@egr.msu.edu> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Andre Guibert de Bruet Date: Fri, 22 Dec 2006 06:47:33 -0500 To: current@freebsd.org X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: ClamAV 0.88.6/2367/Thu Dec 21 11:35:52 2006 on lexi.siliconlandmark.com X-Virus-Status: Clean X-Information: Please contact the ISP for more information X-SL-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-SL-SpamCheck: not spam, SpamAssassin (not cached, score=0.479, required 6, AWL -0.11, BAYES_00 -2.60, RCVD_IN_SORBS_DUL 2.05, SPF_FAIL 1.14) X-MailScanner-From: andy@siliconlandmark.com Cc: Adam McDougall Subject: Re: Laptop display stays on with lid closed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2006 11:58:18 -0000 On Dec 21, 2006, at 7:18 AM, Adam McDougall wrote: > On Wed, Dec 20, 2006 at 11:01:58PM +0300, Andrew Pantyukhin wrote: > > put into /etc/devd.conf and reload devd: > > notify 10 { > match "system" "ACPI"; > match "subsystem" "Lid"; > action "/etc/rc.lid $notify"; > }; > > Then in /etc/rc.lid: > > #!/bin/sh > STAT=$1 > > if [ $STAT = 0x00 ]; then > logger -t Lid $STAT Close at `date +'%Y%m%d %H:%M:%S'` > # do something for lid close event here > else > logger -t Lid $STAT Open at `date +'%Y%m%d %H:%M:%S'` > # do something for lid open event here > fi Would it be possible to see such a script added to /usr/share/ examples/etc? Cheers, /* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */ /* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */ /* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */ /* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */