Subject: Re: apmd battery/line script names
To: None <current-users@netbsd.org>
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
List: current-users
Date: 11/20/1998 14:15:11
>Well, to jump into this discussion: my point is, that names
>don't make it clear if the transition is to the state or from
>the state. Will the battery script be run when we go into
>the state, or when we leave the state?

It was pointed out to me that _all_ of those apm scripts are implicitly
understood to be "to" script.  For example, standby, suspend, and resume
are all scripts run when _entering_ that state.  So line and battery
continue that trend.

>Maybe we call the scripts with parameters like the SYS V rc?.d
>scripts: 
>battery start when we enter battery state
>battery stop when we leave the battery state

I'm not sure rc.d works so well here.  That's nice when you have a bunch
of independent "modules", but for things like states which are exclusive
(you aren't ever going to do "battery stop" without also doing a "line
start"), I'm not sure it's needed.

--Ken