From owner-freebsd-questions@FreeBSD.ORG Sun Jan 24 14:38:27 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FDE9106576D for ; Sun, 24 Jan 2010 14:38:27 +0000 (UTC) (envelope-from norgaard@locolomo.org) Received: from mail.locolomo.org (97.pool85-48-194.static.orange.es [85.48.194.97]) by mx1.freebsd.org (Postfix) with ESMTP id 4705D8FC1C for ; Sun, 24 Jan 2010 14:38:27 +0000 (UTC) Received: from beta.1-16-172-dyn.locolomo.org (unknown [172.16.1.127]) by mail.locolomo.org (Postfix) with ESMTPSA id F24BD1C1A67; Sun, 24 Jan 2010 15:38:25 +0100 (CET) Message-ID: <4B5C5B61.2020306@locolomo.org> Date: Sun, 24 Jan 2010 15:38:25 +0100 From: Erik Norgaard User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Romain Garbage References: <7ab0356e1001240604v22d59edfgcb3761b677aea2f3@mail.gmail.com> In-Reply-To: <7ab0356e1001240604v22d59edfgcb3761b677aea2f3@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: automating network configuration X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2010 14:38:27 -0000 Romain Garbage wrote: > Hello, > > I am looking for a way to automate the configuration of my network > depending on its "topology" (don't know if it's the good word) : I > would like to check the wired interface to see if a cable is plugged > in (by looking at carrier status), if so, bring up the wired > interface, if no bring up the wireless interface. > Is there a way to do this? > > I was wondering if it is possible to do so by scripting rc.conf? Normally you really don't have to think, just enable both, assuming you use dhcp. Wired configuration with dhcp will fail if there is no cable, wireless will fail if there is no signal. You usually won't experience problems even if both are configured. BR, Erik -- Erik Nørgaard Ph: +34.666334818/+34.915211157 http://www.locolomo.org