[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Common power management infrastructure



On Mon, 2004-08-23 at 19:11 +0200, jdthood@yahoo.co.uk wrote:
>> * We need a shared, state-based structure for the basic power
>> management functionality.

> I don't know what you mean by 'state-based'.

As in, not based on events (user pulls power plug) but on state (plug is
not plugged in). And that you get notified of the state, not of the
event that caused it.

>> with subdirectories for events

> Better, I think, to use a single script with a case statement, just
> like initscripts.  Indeed, you can use the initscripts for this
> purpose.  Just augment the existing "start", "stop", etc., methods
> with some new ones for "close-lid" and so on.

> To run these enhanced initscripts you need something like the
> current runlevel system.  On a lid closure event, for example, a
> file or a directory full of specially named symlinks would 
> control which initscripts were run with what arguments and in
> what order.

Yes, that was pretty much what I had in mind. I would like to have them
split up by type, though. Especially because there are events that occur
very frequently, for instance battery charge events; if you don't want
to do anything with that, there should be no penalty.

> Now who is going to implement all this?

I have a one-hour commute by train every day, during which I can work on
"small" projects like this. I'll use that time to build this.

-- 
Bart Samwel <bart@samwel.tk>



Reply to: