From owner-freebsd-mobile@FreeBSD.ORG Thu Jun 19 15:07:01 2003 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8929E37B401 for ; Thu, 19 Jun 2003 15:07:01 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5371443FAF for ; Thu, 19 Jun 2003 15:07:00 -0700 (PDT) (envelope-from freebsd-mobile@m.gmane.org) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19T7YT-0002UU-00 for ; Fri, 20 Jun 2003 00:06:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-mobile@freebsd.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19T7YQ-0002UC-00 for ; Fri, 20 Jun 2003 00:06:50 +0200 From: Jesse Guardiani Date: Thu, 19 Jun 2003 18:06:54 -0400 Organization: WingNET Lines: 86 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart1488101.6tbHRuRpEN" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@main.gmane.org User-Agent: KNode/0.7.2 X-Mail-Copies-To: never Sender: news X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: automatic wireless powersave X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jesse@wingnet.net List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2003 22:07:01 -0000 --nextPart1488101.6tbHRuRpEN Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit Jesse Guardiani wrote: Check this out. I threw a quick little script together that does this pretty well. See attached. I call it from apmd.conf using this event stub: apm_event POWERSTATECHANGE { exec "/etc/rc.powerstatechange"; } Unfortunately, I've noticed that the POWERSTATECHANGE event is tossed three or four times each time I unplug or plug in the power cord. This isn't really a big deal to me, but it would be nice if I could execute a script when the kernel changes my system profile to economy, rather than on each POWERSTATECHANGE event. Does anyone know if that is possible? Thanks. -- Jesse Guardiani, Systems Administrator WingNET Internet Services, P.O. Box 2605 // Cleveland, TN 37320-2605 423-559-LINK (v) 423-559-5145 (f) http://www.wingnet.net --nextPart1488101.6tbHRuRpEN--