From owner-freebsd-current@FreeBSD.ORG Wed May 28 06:26:10 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 746BD106566C for ; Wed, 28 May 2008 06:26:10 +0000 (UTC) (envelope-from ianf@clue.co.za) Received: from munchkin.clue.co.za (munchkin.clue.co.za [66.219.59.160]) by mx1.freebsd.org (Postfix) with ESMTP id 266B48FC2B for ; Wed, 28 May 2008 06:26:09 +0000 (UTC) (envelope-from ianf@clue.co.za) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=20070313; d=clue.co.za; h=Received:Received:Received:To:Subject:From:X-Attribution:Date:Message-Id; b=kHnuSCkMaWeSsCCDP303rF+zrtYXlhUiIj4vnFetW7hL0gl5mQmV7SnVsU5i3fb3kUz29QOcss2QtOFlK5JrJ8iXFW5Q5cP/jwMJEFgRcMlWjN0MS92A/PNJhjjfTz+UzhfYkSrlVlcXFixhuDMXuU6+6KyoQnfTbjQCkdmJQ28ipdIxaDLPTei6MXSkhZagd+7NAb8rZTHanIObuoekGID7w9pnXde6aBxzjtSAjtF3Xs4oPuG1o1+ysk/SEwiN; Received: from uucp by munchkin.clue.co.za with local-rmail (Exim 4.67) (envelope-from ) id 1K1F6v-0006as-9X for current@freebsd.org; Wed, 28 May 2008 06:26:09 +0000 Received: from ianf.clue.co.za ([10.0.0.6] helo=clue.co.za) by urchin.clue.co.za with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1K1F6d-0002ms-Av for current@freebsd.org; Wed, 28 May 2008 06:25:51 +0000 Received: from localhost ([127.0.0.1] helo=clue.co.za) by clue.co.za with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1K1F6c-0000iY-4v for current@freebsd.org; Wed, 28 May 2008 08:25:50 +0200 To: current@freebsd.org From: Ian FREISLICH X-Attribution: BOFH Date: Wed, 28 May 2008 08:25:50 +0200 Message-Id: Cc: Subject: Unconditional 30s boot delay. 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, 28 May 2008 06:26:10 -0000 Hi Recently my systems using DHCP have introduced an unconditional 30 second delay in the boot-up time. The cause is this: /etc/rc.d/routing: routing_start() { static_start options_start # Return without waiting if we don't have dhcp interfaces. # Once we can test that the link is actually up, we should # remove this test and always wait. dhcp_interfaces=`list_net_interfaces dhcp` [ -z "`list_net_interfaces dhcp`" ] && return # Wait for a default route delay=${if_up_delay} while [ ${delay} -gt 0 ]; do defif=`get_default_if -inet` if [ -n "${defif}" ]; then if [ ${delay} -ne ${if_up_delay} ]; then echo "($defif)" fi break fi if [ ${delay} -eq ${if_up_delay} ]; then echo -n "Waiting ${delay}s for an interface to come up: " else echo -n . fi sleep 1 delay=`expr $delay - 1` done } Which is fine and well if routing runs *after* the DHCP request, but it doesn't it runs before devd is started so the default route from DHCP is never acquired and we wait... for 30s.... And this needs an "echo" after the "done" so that the next script's output lands up at the start of the next line. Ian -- Ian Freislich