Annoying ERROR: 'wlan0' is not a DHCP-enabled interface

Doug Barton dougb at FreeBSD.org
Fri Dec 23 21:14:48 UTC 2011


Short version, my opinion has not changed, there is no bug.

On 12/23/2011 06:42, Eygene Ryabinkin wrote:
> Resurrecting this old thread I abandoned due to the ENOTIME and adding
> to CC all people who were expressed interest in fixing the annoyances
> from the devd caused by r226879.
> 
> Sun, Nov 20, 2011 at 12:41:22PM +0300, Mike Telahun Makonnen wrote:
>>> I would say that my (ab)use of it in the patch perfectly fits the
>>> cited usage.  That's not an excuse if the semantics of rc_quiet will
>>> be different from its current usage, but since we have no
>>> well-documented semantics apart from "Don't output some diagnostics"
>>> inside /etc/rc.subr, may be we can just extend this explanation based
>>> on the current usage and the common sense, add that to the manual page
>>> of rc.subr and go on?
>>>
>>> Any thoughts on this?
>>
>> The rc_quiet knob was introduced to prevent devd spamming the console
>> when starting services that weren't enabled in rc.conf.  It was also
>> overloaded to prevent unnecessary boot time clutter on the console.
>> The rationale was that if you set a service to start during boot you
>> don't want a gazillion "bar started" messages to cause the one "Error:
>> foo not started" message that you would really be interested in seeing
>> to scroll out of the screen buffer.  It was used for this purpose in
>> several scripts in rc.d, but it caused quite a ruckus at the time (and
>> I was too distracted by other work to continue working on it) so its
>> use was mostly removed from the scripts under /etc/rc.d.
> 
> OK, what about the following patch that documents the current usage of
> the "quiet" prefix and enables dhclient to recognize this modifier?
> Diff is available from
>   http://codelabs.ru/fbsd/patches/dhclient/dhclient-respect-quiet-mode.diff
> 
> Since the current rc.subr script has the following snippet,
> {{{
>                 if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a "$rc_arg" != "stop" ] ||
>                     [ -n "${rcvar}" -a "$rc_arg" = "stop" -a -z "${rc_pid}" ]; then
>                         if ! checkyesno ${rcvar}; then
>                                 if [ -n "${rc_quiet}" ]; then
>                                         return 0
>                                 fi
>                                 echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to "
>                                 echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' "
>                                 echo "instead of '${rc_arg}'."
>                                 return 0
>                         fi
>                 fi
> }}}

You're misunderstanding the purpose of the above code. It's there so
that you can do 'service foo stop' even if foo_enable is not set.

> I think that error message about non-DHCP-enabled interface falls into the
> same category 

It does not.

> -- we have no "dhcp" modifier inside rc.conf, so we will fail
> loudly, unless we were asked to be quiet, just as in the above code.
> 
>> It was not intended to mask "error" or "debug" messages.
> 
> It is not my intention as well: I care about masking only certain classes
> of error and informational messages with rc_quiet; my patch to rc.subr.8
> documents all current cases where it is appropriate.

Our opinions differ on this point.

> It is the
> internal problem of the devd that spams the first group of people

So adjust devd.conf.

-- 

		[^L]

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/



More information about the freebsd-rc mailing list