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 10:20, Martin Husemann wrote:
> On Mon, Aug 01, 2011 at 01:02:16AM +0200, Jean-Yves Migeon wrote:
>> +    # Starting with NetBSD-6.0, powerd(8) has to be enabled under
>> +    # i386/amd64 to support Xen domU save/restore.
>> +    if [ "$MACHINE" = "i386" ] || [ "$MACHINE" = "amd64" ]; then
>> +            if ! rcvar_is_enabled "powerd"; then
>> +                    msg \
>> +        "powerd(8) is not enabled in rc.conf(5)${notfixed}: use powerd=YES"
>> +                    failed=$(( ${failed} + 1 ))
>> +            fi
>> +    fi
> Can we please use rcconf_is_set (or a variant of that) instead of
> rcvar_is_enabled? There might be legitimate reasons to force it to NO
> by the user and if they do so, we should not nag about it on every later
> update.

Well, it is set to "NO" by default. So if the entry is missing from
/etc/rc.conf, it won't be started. There's no point in adding
"powerd=NO" to rc.conf by the user.

What do you want to achieve? Have a "rcvar_is_set" that tests presence
of the variable in rc.conf, and bails out if it does?

And in case it doesn't find a powerd=<whatever> line, add powerd=YES to
the file directly, or keep the "requires a manual fix"?

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index