From owner-freebsd-net@FreeBSD.ORG Mon Apr 26 16:00:31 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 818DF106567D for ; Mon, 26 Apr 2010 16:00:31 +0000 (UTC) (envelope-from julianelischer@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 0C8E18FC08 for ; Mon, 26 Apr 2010 16:00:30 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id 22so1713415fge.13 for ; Mon, 26 Apr 2010 09:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=fGtNmpOQsFfvi9j+H4y30D6cGTRtSe4/hRNVtoTt+pI=; b=uV6jAyBJG6BIcmqu2AeUvP4J8Sbo5lLvSBFKSuFxzZyPnFdUQO1XFmOGABMLICwhY1 xBecLHcDwjLiwoYDhgW2rzsnQKgirXfacG6YKgBDujzjNM15o34j+KOrxPVxrkvnJtMm VYf3eA+wkSf+FoflJRJ/vrdxew3N26F2vmiwo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=oTFbVbK9VpOz+zMkpZd2iGsD1/X6IMlE0tq/vQQO5RpuWZlBkpjrH33m5b3wyN27xV At7bu2e+C7aNBoe30Y1TIoJqpPdey26y6Toqq4e+761LbcvD5qGX9lB5+AqQ76ymILQn WYe94yDM1GKKpzpV1OW7B/nqAM+1TQxRaor38= Received: by 10.87.67.25 with SMTP id u25mr7754178fgk.32.1272297621478; Mon, 26 Apr 2010 09:00:21 -0700 (PDT) Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by mx.google.com with ESMTPS id e11sm4632160fga.18.2010.04.26.09.00.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 09:00:13 -0700 (PDT) Sender: Julian Elischer Message-ID: <4BD5B887.9070203@elischer.org> Date: Mon, 26 Apr 2010 09:00:07 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Jeremy Chadwick References: <20100426080815.GA41938@icarus.home.lan> In-Reply-To: <20100426080815.GA41938@icarus.home.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, freebsd-rc@freebsd.org Subject: Re: rc(8) script -- waiting for the network to become usable X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Apr 2010 16:00:31 -0000 On 4/26/10 1:08 AM, Jeremy Chadwick wrote: > Foremost, sorry for the cross-post, but more eyes in this case means > overall more discussion. Secondly, please keep me CC'd as I'm not on > either -rc or -net. > > I recently proposed addition of a new script to the rc framework which > verifies (using ping) that layer 3 network connectivity is up/functional > before continuing on with daemons which require network access: a down side is that you can't boot if some OTHER machine is not up. > > http://lists.freebsd.org/pipermail/freebsd-stable/2010-April/056400.html > > The overall response was positive, with full acknowledgement that this > is indeed a hack -- yet necessary -- and that something more appropriate > could probably be introduced into the base system to provide a much > cleaner solution (launchd was mentioned). there does need to be some dependency tracking to do with networks. maybe there acn be a selection of ways to pass that milestone.. (carrier detect, ping, incoming packets non-0) etc. my favourite is: INPUT_PACKETS=`netstat -i | awk "/${IP}/"'{print $5}'` if [ -n "${INPUT_PACKETS}" -a "${INPUT_PACKETS}" != "0" ] them echo "It's UP!" fi > > I'd like folks (particularly on -rc) to chime in here, and please see > about adding this to the base system. > > Please note there's one typo in the script (a line which needs to be > commented out) in my original post which I've since fixed in the version > that's available via HTTP. > > Thank you! >