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

Re: sysvinit vs. new powerd...

I hope Bruce won't mind me cc:'ing this back to debian-devel---he
brings up issues that could stand to have world input, especially
since there's stuff I flat don't know enough about.

In message <m0uR2Dt-0005zFC@mongo.pixar.com>, Bruce Perens writes:
>Note that sysvinit is a base package, and you have no choice about installing
>it. Although powerd and its man page are very small, they probably don't
>belong in the base system.

Um.  Well.  Better tell MvS about that, seeing as how there's already
one there, installed courtesy of sysvinit. :-)

No, really, I agree.

>Note that there are a lot more power daemons. "amsd", "genpower", etc.

I haven't looked at genpower, yet, though I've seen it.  Supposedly
the author of genpower and Alessandro Rubini intended to merge their
two daemons---this was a while ago.  I may look into doing that, if
genpower actually has anything to offer over powerd.

I'm also not familiar with amsd---is it linux-specific, or unix-generic?

>There are a few different ways to power down the computer. You can send a
>command to the UPS, you can tell APM BIOS to power it down, or you can use
>an X-10 switch. The last time I asked about this the suggestion I got was to
>use an init level for power-down. Perhaps we should standardize which init
>level this is.

We already have.  Or, maybe I should say that MvS has done so for us,
while no one was looking.  It's all in sysvinit, from lines in inittab
to scripts in /etc/init.d.  All I had to do was provide a powerd that
would send SIGPWR to init.

Most of the powerd's out there seem to be based on the one included
with sysvinit since way back.

>Also, how much should the UPS and APM interact?

Toughie.  I'd guess that, assuming there's a command available that
will use APM to shut down everything non-essential, it would be
appropriate for the /etc/init.d/powerfail script to call that command
(or a script) as part of its shutdown procedures, in order to extend
battery life.

"Don't let me make you unhappy by failing to be contrary enough...."

Reply to: