From owner-freebsd-stable@FreeBSD.ORG Fri Jun 18 08:57:54 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE57E1065675 for ; Fri, 18 Jun 2010 08:57:54 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta03.westchester.pa.mail.comcast.net (qmta03.westchester.pa.mail.comcast.net [76.96.62.32]) by mx1.freebsd.org (Postfix) with ESMTP id 8D8B98FC1D for ; Fri, 18 Jun 2010 08:57:54 +0000 (UTC) Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74]) by qmta03.westchester.pa.mail.comcast.net with comcast id XLxu1e0071c6gX853Lxuia; Fri, 18 Jun 2010 08:57:54 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta23.westchester.pa.mail.comcast.net with comcast id XLxt1e0023S48mS3jLxu5x; Fri, 18 Jun 2010 08:57:54 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 8F9049B425; Fri, 18 Jun 2010 01:57:52 -0700 (PDT) Date: Fri, 18 Jun 2010 01:57:52 -0700 From: Jeremy Chadwick To: Mark Stapper Message-ID: <20100618085752.GA36238@icarus.home.lan> References: <4C1B2180.1040300@mapper.nl> <20100618082640.GB34578@icarus.home.lan> <4C1B32A6.6070601@mapper.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C1B32A6.6070601@mapper.nl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-stable@freebsd.org Subject: Re: network deamons starting before network! X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jun 2010 08:57:54 -0000 On Fri, Jun 18, 2010 at 10:47:34AM +0200, Mark Stapper wrote: > On 18/06/2010 10:26, Jeremy Chadwick wrote: > > On Fri, Jun 18, 2010 at 09:34:24AM +0200, Mark Stapper wrote: > > > >> Hello, > >> > >> Since updating to 8.X I noticed that network services were started > >> before the network was up! > >> > > This is common/normal. I wrote a script (still working on getting it > > added to the base system) to deal with this issue. Please see: > > > > http://jdc.parodius.com/freebsd/netwait > > > > Drop this into /usr/local/etc/rc.d, chmod it 755, and read the > > descriptions of the variables and add the appropriate settings to > > rc.conf. > > > > Please be aware netwait_if only takes a single interface; you're using > > lagg, so I hope that when your system boots whichever interface you pick > > in netwait_if the one which you default to using. > > > > > couldn't I use lagg0 on this parameter? You could, but it won't necessarily work in the way you think it will. netwait explicitly looks for link interface state ("status: no carrier") in ifconfig output. This methodology is used in other base system scripts. If lagg devices offer that line in ifconfig, then the script will work but won't necessarily do what you expect. It's very common on FreeBSD for drivers of this sort to ""lie"" (please note the quotes) about the state of link. Meaning, lagg0 might show link, but maybe that means "Yeah! I'm configured!" -- but that doesn't mean the *physical network interfaces lagg0 is associated with* are actually functional. See where I'm going with this? In your situation, assuming lagg0 provides a status line in ifconfig, then yes you can use that -- but *ultimately* you're going to be reliant entirely upon the netwait_ip ping tests to verify network connections are working. That's just the nature of the beast. The bottom line is that the netwait script *cannot* be reliably used in "complex network situations" (and this may be one of those). Below is my original mail to -stable about the script (then called "waitnetwork"); see "CAVEATS / POINTS OF INTEREST". There is truly no universal way that covers everyone's configuration/setup. http://www.mail-archive.com/freebsd-stable@freebsd.org/msg109853.html -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |