Re: [Call for review] apmd for FreeBSD

1999-06-30 Thread Mitsuru IWASAKI

Hi,

Documentation of apmd was updated by cooperation with 
Nick Hilliard [EMAIL PROTECTED].
# Thanks Nick!

Updated README and apmd.8 are available at:
http://home.jp.freebsd.org/~iwasaki/apm/19990630/apmd-doc.tar.gz
http://home.jp.freebsd.org/~iwasaki/apm/19990630/apmd-doc.diff.gz

Also, I'm going to import them on this (or next) weekend
if nothing happened.
# I'm not sure when because I'm in the hospital... :-(

Thanks


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: [Call for review] apmd for FreeBSD

1999-06-30 Thread Mitsuru IWASAKI
Hi,

Documentation of apmd was updated by cooperation with 
Nick Hilliard n...@foobar.org.
# Thanks Nick!

Updated README and apmd.8 are available at:
http://home.jp.freebsd.org/~iwasaki/apm/19990630/apmd-doc.tar.gz
http://home.jp.freebsd.org/~iwasaki/apm/19990630/apmd-doc.diff.gz

Also, I'm going to import them on this (or next) weekend
if nothing happened.
# I'm not sure when because I'm in the hospital... :-(

Thanks


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



[Call for review] apmd for FreeBSD

1999-06-27 Thread Mitsuru IWASAKI
Hi,

I'm ready to import apmd into freefall CVS repository.
Now manpage (first version) and patch for CURRENT kernel were prepared :)

Please review them before my commit.  Any comments, suggestions, 
corrections are very appreciated.
The latest (and final?) version of apmd package is available at:

apmd(8):
http://home.jp.freebsd.org/~iwasaki/apm/19990628/apmd-usr.sbin.tar.gz

CURRENT kernel patch (as of 19990628):
http://home.jp.freebsd.org/~iwasaki/apm/19990628/apmd-sys-CURRENT.diff.gz

No changes were made for previous PAO3 and 3.2-RELEASE kernel patch:
http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-sys-PAO3.diff.gz
http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-sys-R320.diff.gz

Thanks.


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: apmd for FreeBSD

1999-06-15 Thread Mitsuru IWASAKI
Thanks a lot for your testing.
I'm preparing -current NotePC for testing this.

imp I've applied the patches to my -current system.  I had to apply two by
imp hand, and then it just compiled and appeared to work with no ill
imp effects on my desktop.

It should :)

I heard that 3.2-RELEASE kernel patch can be applied to 
-STABLE (even 2.2-STABLE) with no rejects because there are 
few differences between them.


imp P.S. I've put my diffs vs -current at
imphttp://www.freebsd.org/~imp/apmd-sys-current.diff.gz

Thanks. Give my kind regards.


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: apmd for FreeBSD

1999-06-15 Thread Warner Losh
In message 199906151750.caa23...@tasogare.imasy.or.jp Mitsuru IWASAKI writes:
: Thanks a lot for your testing.
: I'm preparing -current NotePC for testing this.

You are most welcome.  I'm glad that I could be of assistance.  I've
wanted something like this for a long time, but never found the time
to implement it.

: imp P.S. I've put my diffs vs -current at
: imp  http://www.freebsd.org/~imp/apmd-sys-current.diff.gz
: 
: Thanks. Give my kind regards.

No problem.  I'm glad that I could be of assistance.

Warner


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



Re: apmd for FreeBSD

1999-06-14 Thread Warner Losh
In message 199906101257.vaa16...@tasogare.imasy.or.jp Mitsuru IWASAKI writes:
: apmd(8):
: http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-usr.sbin.tar.gz

With the patched include files, this compiles and appears to work on
-current.

: 3.2-RELEASE kernel patch:
: http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-sys-R320.diff.gz

I've applied the patches to my -current system.  I had to apply two by
hand, and then it just compiled and appeared to work with no ill
effects on my desktop.

Good job.  Now to testing on my laptop

Warner

P.S. I've put my diffs vs -current at
http://www.freebsd.org/~imp/apmd-sys-current.diff.gz


To Unsubscribe: send mail to majord...@freebsd.org
with unsubscribe freebsd-hackers in the body of the message



apmd for FreeBSD

1999-06-10 Thread Mitsuru IWASAKI
Hi, folks.

graham ooh apmd, cool.
graham I was wondering if someone had started somthing like this, I'm excited.

Sorry to late, now first version of apmd package for FreeBSD is available at

apmd(8):
http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-usr.sbin.tar.gz

3.2-RELEASE kernel patch:
http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-sys-R320.diff.gz

if you are using PAO3, kernel patch would be

PAO3 kernel patch:
http://home.jp.freebsd.org/~iwasaki/apm/19990610/apmd-sys-PAO3.diff.gz

The kernel patches for 2.2-STABLE and -CURRENT are not available for now.
Please make contact with me if you need them.

Any comments, suggestions, bug-reports, improvements are very much 
appreciated.
I'm looking forward working with you :-)

---
FreeBSD apmd Package Release Notes (19990610 version)

1. What's apmd package
==

This apmd package provides a means of handling various APM events from
userland code.  From apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.


2. How to install the apmd package
==

2.1 Making the apmd control device file
---

apmd(8) uses the new special device file /dev/apmctl.  You should create
the device file before using apmd as follows:

# cd /dev
# mknod apmctl c 39 8

2.2 Applying the kernel patch and building a new kernel
---

The next step is to apply the patch against the sys source tree.
Go to the source directory (eg. /usr/src/ or /usr/PAO3/src/) and run
the patch command as follows:

# gzip -cd [somewhere]/apmd-sys-R320.diff | patch

For PAO3 users, the patch file name would be apmd-sys-PAO3.diff
instead of apmd-sys-R320.diff.  After this step has completed
successfully, build and install a new kernel and reboot your system.

2.3 Making the apmd program
---

Go to src/usr.sbin/ and extract the apmd tarball as follows:

# tar xzpvf [somewhere]/apmd-usr.sbin.tar.gz 

Before doing a make all, you need to copy apm_bios.h in the sys source
tree to /usr/include/machine/ first:

# cp /sys/i386/include/apm_bios.h /usr/include/machine/

Then do the build and install steps in the apmd directory:

# cd src/usr.sbin/apmd
# make depend all install

2.4 Setting up the configuration file and userland script
-

In src/usr.sbin/apm/etc/ there are example configuration and userland
script files which are invoked automatically when the APM BIOS informs
apmd of an event, such as suspend request.  Copy these files to
/etc/apm as follows:

# mkdir /etc/apm
# cp src/usr.sbin/apm/etc/* /etc/apm/


3. Running the apmd daemon program
==

To run apmd(8) in background mode, simply type ``apmd''.

# apmd

To make a running apmd reload /etc/apm/apmd.conf, send a SIGHUP signal to
the apmd(8) process.

# kill -HUP [apmd pid]
or
# killall -HUP apmd

apmd has some command line options.  For the detials, please 
refer to the source code :-)

4. Configuration file
=

The structure of the apmd configuration file is quite simple.  For
example:

apm_event SUSPENDREQ {
exec sync  sync  sync;
exec sleep 1;
exec zzz;
}

Will cause apmd to recieve the APM event SUSPENDREQ (which may be
posted by an LCD close), run the sync command 3 times and wait for a
while, then execute zzz (apm -z) to put the system in the suspend
state.

4.1 The apm_event keyword
-
`apm_event' is the keyword which indicates the start of configuration for
each events.

4.2 APM events
--

`SUSPENDREQ' is one of the APM event names.  You can specify 2 or more
events delimited by a comma, executing the same commands for these
events.  The following are available event names:

o Events ignored by the kernel if apmd is running:

STANDBYREQ
SUSPENDREQ
USERSUSPENDREQ
BATTERYLOW

o Events passed to apmd after kernel handling:

NORMRESUME
CRITRESUME
STANDBYRESUME
POWERSTATECHANGE
UPDATETIME


Other events will not be sent to apmd.

4.3 command line syntax
---

In our example, the next 3 lines begining with `exec' are commands for
the event.  Each line should be terminated with a semicolon.  The
command list for the event should be enclosed by `{' and `}'. apmd(8)
uses /bin/sh for double-quotation enclosed command execution, just as
with system(3).  Each command is executed in order until the end of
the list is reached or a command finishes with a non-zero status code. 
apmd(8) will report any failing command's status code via syslog(3).

4.4 Built-in functions
--

You can also specify apmd built-in functions instead of command lines.
A built-in function name should be terminated