From owner-freebsd-questions@FreeBSD.ORG Thu Feb 19 17:53:11 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 7D3AC16A4CE for ; Thu, 19 Feb 2004 17:53:11 -0800 (PST) Received: from mtiwmhc12.worldnet.att.net (mtiwmhc12.worldnet.att.net [204.127.131.116]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E08F43D2D for ; Thu, 19 Feb 2004 17:53:11 -0800 (PST) (envelope-from duanewinner@worldnet.att.net) Received: from [10.10.0.103] (pcp04355855pcs.glstrt01.nj.comcast.net[68.45.111.171]) by worldnet.att.net (mtiwmhc12) with SMTP id <2004022001531011200ni4ske> (Authid: duanewinner); Fri, 20 Feb 2004 01:53:10 +0000 From: Duane Winner To: freebsd-questions Content-Type: text/plain Organization: UTRS, Inc. Message-Id: <1077242095.304.9.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 19 Feb 2004 20:54:55 -0500 Content-Transfer-Encoding: 7bit Subject: method to test for link before dhclient at boot? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: duanewinner@att.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2004 01:53:11 -0000 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