From owner-acpi-jp@jp.FreeBSD.org Tue Dec 30 06:02:23 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id hBTL2N732460;
	Tue, 30 Dec 2003 06:02:23 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from rootlabs.com (root.org [67.118.192.226])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with SMTP/inet id hBTL2MC32455
	for <acpi-jp@jp.freebsd.org>; Tue, 30 Dec 2003 06:02:22 +0900 (JST)
	(envelope-from nate@rootlabs.com)
Received: (qmail 14330 invoked by uid 1000); 29 Dec 2003 21:02:17 -0000
From: Nate Lawson <nate@root.org>
To: acpi-jp@jp.FreeBSD.org
Message-ID: <20031229125407.T14293@root.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Mon, 29 Dec 2003 13:02:17 -0800
X-Sequence: acpi-jp 2951
Subject: [acpi-jp 2951] rc.suspend/resume for ACPI
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: nate@root.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+031216

I want to have acpiconf directly call /etc/rc.{suspend,resume} if they are
present since apmd is not running for ACPI.  Our default rc.suspend will
have to change to not call zzz for the acpi case.  I am thinking about
adding a few arguments to rc.suspend and resume as follows:

arg1: acpi/apm -- indicates which subsystem is calling the script
arg2: for acpi, numbers 1-5 -- indicate with S-state is being entered/exited
      for apm, suspend/standby -- sleeping states being entered/exited

Then I would change the default apmd.conf to call the scripts with these
arguments and change the source for acpiconf to execute them before
entering and after exiting sleep states.  I can't use devd for this since
devd does notification only, so I couldn't be sure the script had finished
running before the system entered the sleep state.

Comments?

-Nate
