tech-userlevel archive

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

Re: Making powerd=YES default

On 25.07.2011 20:11, Emmanuel Dreyfus wrote:
> On Mon, Jul 25, 2011 at 03:12:40PM +0100, Jean-Yves Migeon wrote:
>> As said to Emmanuel, I have no problem enabling it on a per-arch
>> basis by patching etc.[i386,amd64]/Makefile.
> I think the sysctl telling that power management is avaiable, and
> having powerd start or not depending on it, is a good idea: the
> syscl could be usefull for other purposes.

In that case there's already some logic available in powerd(8). It's
trivial to make it exit(2) in situations where it doesn't find a power
management backend.

That's a bit different from the current code where it checks first that
/etc/powerd/scripts/<power_type> is present, then falls back to

Exposing the power management backend as a read-only sysctl is also an

IMHO, powerd(8) shall exit unless there is code that explicitly
registers a backend. It has no real meaning (to me, at least) to handle
power events where there is nothing expecting it to be so.

There, /etc/powerd/scripts would rather be:


Or even move away "scripts" entirely. Nothing specifies that these
should be scripts.

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index