From owner-freebsd-current@FreeBSD.ORG Mon Aug 17 02:58:30 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A73F106568B for ; Mon, 17 Aug 2009 02:58:30 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 302B38FC15 for ; Mon, 17 Aug 2009 02:58:29 +0000 (UTC) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id n7H2wTsO081487; Sun, 16 Aug 2009 19:58:29 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.3/Submit) id n7H2wTet081486; Sun, 16 Aug 2009 19:58:29 -0700 (PDT) (envelope-from david) Date: Sun, 16 Aug 2009 19:58:29 -0700 From: David Wolfskill To: Kamigishi Rei Message-ID: <20090817025829.GH74242@bunrab.catwhisker.org> References: <90E06EA7-4D27-411C-962F-BBCB6D6A13C6@mac.com> <4A88C31C.70204@haruhiism.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AqCDj3hiknadvR6t" Content-Disposition: inline In-Reply-To: <4A88C31C.70204@haruhiism.net> User-Agent: Mutt/1.4.2.1i Cc: FreeBSD Current Subject: Re: rc(8) regression. What's the story? 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: Mon, 17 Aug 2009 02:58:30 -0000 --AqCDj3hiknadvR6t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 17, 2009 at 06:40:28AM +0400, Kamigishi Rei wrote: > ... > This happens for me with some interfaces (namely, bge and em) as well;=20 > media state is detected with a slight delay and therefore by the time=20 > ntpdate is started we don't have an IP address yet. > ... Perhaps it might be appropriate to ensure that we have an IP address before starting ntpd, then? As far as the actual check, examining the output of "netstat -nif inet" or "netstat -nif inet6" is generally what I'd normally do. Possibilities that come to mind: * Modify rc.d/netif to ensure that an IP address is assigned before it exits (assuming(!) that at least one interface has come up. * Modify rc.d/ntpd to ensure that an IP address is assigned before it tries to start ntpd(8). * Create a new rc.d script that sleeps until an IP address is assigned. I think the latter would be most flexible, as the appropriate keywords could be specified for precisely those rc.d/* scripts that actually need an IP address in order to function, though implementing it might engender rather more churn in /etc/rc.d/* than folks might prefer. Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --AqCDj3hiknadvR6t Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkqIx1QACgkQmprOCmdXAD3xEgCcC0X76qfyXZIP4JTP6pdhwam9 00kAmwdbJnW+kAkG+zXlaey9+BNMyywR =BdY8 -----END PGP SIGNATURE----- --AqCDj3hiknadvR6t--