tech-userlevel archive

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

Re: Making powerd=YES default



On 01.08.2011 18:20, Iain Hibbert wrote:
> On Mon, 1 Aug 2011, Jean-Yves Migeon wrote:
> 
>> On 01.08.2011 17:28, Martin Husemann wrote:
>>> See the bluetooth changed Iain did a few days ago, which had just the
>>> same issue.
>>
>> We're not in the same situation: bluetooth is about migrating from the
>> old rcvar variables to the "bluetooth" one. Mine is about keeping the
>> same variable, but enable it on a per-arch basis.
> 
> you could change the "powerd" script name to something else, so that the
> variable was changed.. ?

Bluetooth expects the following:
1 - that obsolete variables aren't used any more in /etc/rc.conf. Not my
case.
2 - in case they are, warn user and ask him to update to bluetooth=YES.

Functionally, yes, it looks the same. However, Martin wanted me to add a
condition that renders the check silent if the user explicitly set
powerd=NO (or anything functionally equivalent) in /etc/rc.conf.

Problem: given the way /etc/rc.conf is designed, it will first include
/etc/defaults/rc.conf:

http://nxr.netbsd.org/xref/src/etc/rc.conf

How am I supposed to parse /etc/rc.conf via eval without polluting the
environment with default values? Given that /etc/defaults/rc.conf sets
powerd=NO by default: fail. And implementing a half-backed solution with
regexps is an ugly hack.

-- 
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index