From owner-freebsd-rc@FreeBSD.ORG Mon Dec 26 08:17:09 2011 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E61A9106564A; Mon, 26 Dec 2011 08:17:08 +0000 (UTC) (envelope-from rea@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id 7314B8FC08; Mon, 26 Dec 2011 08:17:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=e+ZmttWICJ/XwmZICAeouhpCGbUqb5QZIRNnHQUH1fI=; b=tR44q/ArBWlA7J/7JyPFmfBGWan4SUjBs2a8cHjT9HNECYm67+AGQbhi+HC4g4eGSBE1S6g+ChogbCDOkXt8qMubIy+a4EuYuNa3y3lAqTn8rPYAsCK9rnqSiWwANxwcN6pXJrCdC4YB9pV00BBOutsMAPeyE9lVHJwI2ZJiE1MffTVB6iEafp0Cq9Tuq4FL/xIuswMFYep0QJG/cX1ekUg1yzZKF4j2a8HH0xglPy7kamc4mf6WzTLbwql2eMflJJhZmD0ahn5ua8eABnSjvqh7vCpJputO+umx0/GOq4PdGrA56e3MrZsddC4iz8tLcWw2ProHfOYtsvFhQJZy2g==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1Rf5k0-000Bwj-4H; Mon, 26 Dec 2011 11:17:04 +0300 Date: Mon, 26 Dec 2011 12:17:00 +0400 From: Eygene Ryabinkin To: Doug Barton Message-ID: References: <4EF6401E.3080902@FreeBSD.org> <20111224215649.GA12789@stack.nl> <4EF80CA7.3070303@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DMLl6fZPX8o7hGmc" Content-Disposition: inline In-Reply-To: <4EF80CA7.3070303@FreeBSD.org> Sender: rea@codelabs.ru Cc: Pyun Yong-Hyeon , d@delphij.net, Garrett Cooper , Gleb Smirnoff , freebsd-rc@freebsd.org Subject: Re: Annoying ERROR: 'wlan0' is not a DHCP-enabled interface X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Dec 2011 08:17:09 -0000 --DMLl6fZPX8o7hGmc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Sun, Dec 25, 2011 at 09:56:55PM -0800, Doug Barton wrote: > On 12/24/2011 13:56, Jilles Tjoelker wrote: > > And rea@'s patch does this: > > service dhclient start IF > > generates error messages if IF is not enabled for DHCP in rc.conf, while > > service dhclient quietstart IF > > does not. > >=20 > > This works the same way as service food start/quietstart when food is > > not enabled in rc.conf. > >=20 > > Therefore I do not see what is wrong with rea@'s patch. >=20 > That's not the interesting case. The interesting case is the interface > *is* configured with DHCP, but no error message is generated when it > fails because they've been hidden. The error message "'$ifn' is not a DHCP-enabled interface" is not generated when $ifn is DHCP-enabled interface, {{{ dhclient_pre_check() { if [ -z "${rc_force}" ] && ! dhcpif $ifn; then local msg msg=3D"'$ifn' is not a DHCP-enabled interface" if [ -z "${rc_quiet}" ]; then err 1 "$msg" else debug "$msg" exit 1 fi fi } }}} '! dhcpif $ifn' guarantees it. And all other errors aren't masked by my patch, so everything is fine here. The only way to miss the diagnostic message is to rely that devd will configure your interface automagically while one forget to enable DHCP on the interface he expect to automagificy. That's pity, but the lone 'service dhclient start $if' or 'service netif start $if' will reveal the truth. > That's the bit that's confusing to me. I've administered hundreds of > FreeBSD systems, servers and desktops, with and without DHCP, and I > don't remember ever seeing these messages. They will show up only for people who are running HEAD with /usr/src r226879 or later: the changes weren't MFCed into any RELENG branch yet. > Perhaps someone can show the configuration combination that will > create them? My way to reproduce it with Ethernet-only configuration is just to unplug and plug back the cord to the switch to generate the linkup event that will push devd. You will need dhclient from r226879 and not the patched one (with dhclient_pre_check cited above), because it won't generate noise -- it uses 'debug' for the devd invocation. The same thing should be seen for the WiFi interfaces that aren't DHCP-enabled. Left my FreeBSD-enabled notebook at home, so can't test is just now. > If so, I'll be glad to give the patch another look to confirm that > my concerns about false negatives are being addressed. Will be very good. Thanks. --=20 Eygene Ryabinkin ,,,^..^,,, [ Life's unfair - but root password helps! | codelabs.ru ] [ 82FE 06BC D497 C0DE 49EC 4FF0 16AF 9EAE 8152 ECFB | freebsd.org ] --DMLl6fZPX8o7hGmc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EAREIAAYFAk74LXwACgkQFq+eroFS7PscJgD/RvU2meLFhSVfzjrQxD2dlsX8 kckdFxnsoTgwQgJ+BP4A/2+sfW1cxEBMORVVlfewFa2C3c8e9+YdmPdtYuJo2xMG =N27O -----END PGP SIGNATURE----- --DMLl6fZPX8o7hGmc--