From owner-freebsd-current@FreeBSD.ORG Wed Aug 31 19:46:13 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 231C816A41F; Wed, 31 Aug 2005 19:46:13 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB0C243D46; Wed, 31 Aug 2005 19:46:12 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j7VJkCO1002691; Wed, 31 Aug 2005 12:46:12 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7VJkC7E002690; Wed, 31 Aug 2005 12:46:12 -0700 Date: Wed, 31 Aug 2005 12:46:12 -0700 From: Brooks Davis To: Robert Watson Message-ID: <20050831194612.GG32477@odin.ac.hmc.edu> References: <20050831120730.B39418@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050831120730.B39418@fledge.watson.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: current@freebsd.org Subject: Re: Ctrl-c abort of dhclient during rc.d start aborts all network configuration X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 19:46:13 -0000 On Wed, Aug 31, 2005 at 12:10:44PM +0100, Robert Watson wrote: > > I believe this is related to the new dhclient -- when I run my notebook > disconnected from the network, the boot pauses for about 15-20 seconds > waiting for a link on xl0. Being impatient when booting in airports just > before my flight, I like to hit Ctrl-C and abort it, since I know that > there will be no link. In the old world order, this was fine, dhclient > was simply killed and all was good. In the new world order, it kills all > of the netif startup script, and for some reason (ordering related, > presumably), this prevents 127.0.0.1 from being configured on lo0, which > causes a number of applications to die, since 0.0.0.0 cannot be bound. It > sounds like a couple of things are unfortunate here: The wait should be 10 seconds plus some startup time. > (1) It would be good to configure lo0 first. Interfaces are configured in order of index by default. If lo0 were attached sooner, it would be configured sooner. I'm somewhat tempted to change it from it's current (apparently bogus) position in the startup process at SI_SUB_PROTO_IFATTACHDOMAIN to SI_SUB_INIT_IF/SI_ORDER_ANY and push the l2com attachments from SI_ORDER_ANY to SI_ORDER_MIDDLE. Strictly speaking I think lo(4) should be SI_SUB_PSEUDO, but moving it up so it attached first makes some sense given how critical it is. Alternativly, one could add code to sort the result of "ifconfig -l" to configure lo0 first. > (2) If a dhclient is ctrl-c'd, it would be nice if the rest of the network > configuration continued. I don't see any code in the startup scripts that would cause them to exit on failure so the issue is probalby that the signal is being delivered to the /etc/rc.d/netif instance. I don't really know what the solution to that is. > The printing of '.'s in dhclient is also a bit excessive. Hanging with no output seems even less unhelpful. :( Longer term I want to get rid of syncronous calls to dhclient in the startup process, but I haven't had time to work on it and IMO, it's a bit late in the game for 6.0. -- Brooks