Date: Mon, 26 Apr 2010 09:00:07 -0700 From: Julian Elischer <julian@elischer.org> To: Jeremy Chadwick <freebsd@jdc.parodius.com> Cc: freebsd-net@freebsd.org, freebsd-rc@freebsd.org Subject: Re: rc(8) script -- waiting for the network to become usable Message-ID: <4BD5B887.9070203@elischer.org> In-Reply-To: <20100426080815.GA41938@icarus.home.lan> References: <20100426080815.GA41938@icarus.home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
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! >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BD5B887.9070203>