From owner-freebsd-questions@FreeBSD.ORG Thu Feb 19 18:23:01 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D836E16A4CF for ; Thu, 19 Feb 2004 18:23:01 -0800 (PST) Received: from gw.pelleg.org (gw.pelleg.org [205.201.13.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AFAF43D2D for ; Thu, 19 Feb 2004 18:23:01 -0800 (PST) (envelope-from daniel+bsd@pelleg.org) Received: from lank.here (lank.wburn [192.168.3.41]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "gw.pelleg.org", Issuer "Dan Pelleg" (verified OK)) by gw.pelleg.org (Postfix) with ESMTP id D096459EE; Thu, 19 Feb 2004 21:22:59 -0500 (EST) Received: by lank.here (Postfix, from userid 7675) id DA932BD; Thu, 19 Feb 2004 21:22:57 -0500 (EST) To: duanewinner@att.net References: <1077242095.304.9.camel@localhost> From: Dan Pelleg Date: Thu, 19 Feb 2004 21:22:57 -0500 In-Reply-To: <1077242095.304.9.camel@localhost> (Duane Winner's message of "Thu, 19 Feb 2004 20:54:55 -0500") Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.1 (Cuyahoga Valley, berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions Subject: Re: method to test for link before dhclient at boot? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2004 02:23:02 -0000 Duane Winner writes: > Hello, > > I'm wondering if anybody knows a technique for this problem: > > I have a laptop that I frequently boot when it is not plugged into an > ethernet network. > > In these circumstances, I would like to add some logic during boot time > that looks at at the status of my fxp0 interface. > > If "status: no carrier" is true, then I do not want dhclient to run. I > want the boot process to bypass DHCP so that it will boot faster, or so > that I don't have to hit "CTRL-C" after the hostname is set, and so that > I can easily run my wireless setup script or ppp manually if I choose to > connect to a network at all. > > But I still need to be able to detect an active link state on fxp0 and > lease a DHCP address automatically for when I'm in the office and > plugged in. > > Is there a way to accomplish this? > > Thanks, > DW > Use nicmond (net/nicmond in ports). It will do all that, and even bring your interface up as soon as you plug the network cable in. -- Dan Pelleg