From owner-freebsd-rc@FreeBSD.ORG Tue Dec 27 15:29:04 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 D45BD106566C; Tue, 27 Dec 2011 15:29:04 +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 5B3798FC13; Tue, 27 Dec 2011 15:29:04 +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=QgRHBR5iPFquRJo0Sd81m3ZWCHAxuJfAISZB9XUDscQ=; b=l/6eQC0krROiooALsjLp5k4BRkmOQYLbdnX0LtLuIqulJ3zyTw0VU4rA6CoxevWO/feEPAFekdarbaGPJadMfBJZxX8CF3jouaJKDHEigBz+XcmGg01mxIBrXjaQyhO0SaOBWEs8Z30/PCmizJjhroBH3HLuj1OqTeM2Z1m2b20MRfAitRhPVXJ+gUeYkTSqhYA1HTHiNTZHtF18xcrnIYqjHuz9Mx4XIY1x7W0ozYZdMOkgTtkVtvwLJgcjFpSs0y92IgikRYsgddUp9v+nxsKFn63o81ozF9AAkXVe+2LO+xK0Aog5Tk9Lzh3+WWdP4eUDsVKa/HdkpKw+p5FjnQ==; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1RfYxa-000E0m-DL; Tue, 27 Dec 2011 18:29:02 +0300 Date: Tue, 27 Dec 2011 19:28:56 +0400 From: Eygene Ryabinkin To: Doug Barton Message-ID: References: <4EF99DBC.6020204@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="309evMHi/619oHyA" Content-Disposition: inline In-Reply-To: <4EF99DBC.6020204@FreeBSD.org> Sender: rea@codelabs.ru Cc: Pyun Yong-Hyeon , Brooks Davis , freebsd-rc@FreeBSD.ORG, Garrett Cooper , Gleb Smirnoff , Dag-Erling Smorgrav , d@delphij.net, Xin LI 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: Tue, 27 Dec 2011 15:29:05 -0000 --309evMHi/619oHyA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Tue, Dec 27, 2011 at 02:28:12AM -0800, Doug Barton wrote: > On 12/27/2011 01:26, Eygene Ryabinkin wrote: > > I would not be against the netif route, but it creates serious > > problems >=20 > Ok, you've convinced me that this approach isn't viable. How cool is that ;)) > That's why I asked for review before committing it. Thanks for > looking at it in more detail. You are welcome. > I will take a stab at the idea of a wrapper script tomorrow. It's not > going to need to duplicate anything more of the mechanics of > rc.d/dhclient than calling dhcpif(), which is itself from network.subr, > so the code duplication is extremely minimal. If nothing else, the > ability to add configuration of IPv6 interfaces here would make it > worthwhile. I have no problems with the wrapper if it will do some additional tasks, but just one question: if we will omit the IPv6 stuff for a while, how your wrapper will be different from my approach of using the 'quietstart' keyword? Your wrapper will determine that DHCP isn't enabled on the interface and will call 'service dhclient quietstart $ifn'. My 'quietstart' patch already embeds the part of your wrapper that uses dhcpif and will bail out quickly. The general logics for your wrapper (the full one, with IPv6 autoconf) will likely look as the following: {{{ start () { service dhclient quietstart $ifn && exit 0 quietstart $ifn && exit 0 exit 1 } }}} One could conditionalize the priority of DHCP and IPv6 given that the dhclient from base will support IPv6 at some point (just now it doesn't support, at least I hadn't found any IPv6 bits inside /usr/src/sbin/dhclient in -CURRENT), but that's another story that is out of the current scope. Your wrapper, that won't exploit my patch, will look like {{{ start () { dhcpif $ifn && \ service dhclient quietstart $ifn && exit 0 ipv6_autoconfif $1 && \ quietstart $ifn && exit 0 exit 1 } }}} I just wonder why you're not up to using the existing 'quietstart' semantics? Our conversation 'bout it stopped at the point of the message http://lists.freebsd.org/pipermail/freebsd-rc/2011-December/002587.html It will be still good to know what worries you in my approach. Could you, please, answer to the first part of my message about the failure you're concerned with? 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 ] --309evMHi/619oHyA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EAREIAAYFAk755DgACgkQFq+eroFS7Ps2fwEAhspur+C4DZa4JexXmVY2KsPT kdg72HkUY2756aRmsV0A/R10lImzEEh0Ecs4RCJ1+slBV38LQdCT9/PZ3x9582+W =1Ikv -----END PGP SIGNATURE----- --309evMHi/619oHyA--