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:05, Martin Husemann wrote:
> The situation is close: you want to know if there is an explicit setting
> in rc.conf (and not what value it has after inheriting from defaults/rc.conf).

The bluetooth checks are done on /etc/rc.conf through eval. Given that
/etc/rc.conf inherits its settings from /etc/defaults/rc.conf (see the
beginning of the file), I can't simply check whether the wannabee
powerd=NO line comes from /etc/rc.conf solely, or inherited from
/etc/defaults/rc.conf via ". /etc/defaults/rc.conf".

Have a look to a rc.conf, it will set its environment by executing
/etc/defaults/rc.conf first.

> Maybe you can't use the same function verbatim, but a very close clone of
> it (or even factor out the common part).

Well then, just show me how you would do that. Have a look at

It executes /etc/rc.conf first (so that variables are set), which will
also executes /etc/defaults/rc.conf internally. Now how the script is
expected to know that "powerd=NO" came from /etc/rc.conf, and not

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index