From owner-freebsd-current@FreeBSD.ORG Tue Jul 5 16:00:54 2005 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9781316A41C for ; Tue, 5 Jul 2005 16:00:54 +0000 (GMT) (envelope-from oberman@es.net) Received: from postal2.es.net (postal2.es.net [198.128.3.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EB6F43D49 for ; Tue, 5 Jul 2005 16:00:54 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal2.es.net (Postal Node 2) with ESMTP (SSL) id IBA74465; Tue, 05 Jul 2005 09:00:52 -0700 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 6FF995D07; Tue, 5 Jul 2005 09:00:52 -0700 (PDT) To: =?ISO-8859-1?Q?Erik_N=F8rgaard?= In-reply-to: Your message of "Tue, 05 Jul 2005 17:34:29 +0200." <42CAA885.2000101@locolomo.org> Date: Tue, 05 Jul 2005 09:00:52 -0700 From: "Kevin Oberman" Message-Id: <20050705160052.6FF995D07@ptavv.es.net> Cc: Rob B , current@FreeBSD.org Subject: Re: dhclient.conf for ath wireless X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2005 16:00:54 -0000 > Rob B wrote: > > At 06:18 PM 5/07/2005, Erik Nørgaard wrote: > > > >> in dhclient.conf. But on boot, dhclient enters into an infinite loop > >> bringing up and down the interface, until I break it. I have to > >> manually run "ifconfig ath0 ssid MYAP mode 11g" and then start > >> dhclient manually to force it to associate correctly with MYAP. > > > > Have you tried putting the appropriate ifconfig command line into > > /etc/start_if.ath0. That works for me. > > Thanks, that was the keyword I needed. I searched google and at it > appears that in -current the start_if script may be replaced by setting > the options in the rc.conf: > > ifconfig_ath0="ssid MYAP mode 11g DHCP" > > It doesn't seem to be appropriate if you hook up to various networks, > such as at home, Starbucks etc. would be neat to have the startup script > to run through the preconfigured networks and pick the first one that works. Check out Tobias Roth's profile. https://projects.fsck.ch/profile It will allow you to define any number of "profiles" and the first one that matches our current connection will do a unionfs mount of a MD file system over /etc. It must contain a new rc.conf and may contain any other /etc files specific to a given location. I typically have two start_if files (one for my wireless and another of the wired connection) and a resolv.conf file in each profile. It is a bit awkward to set up, but once set up, it just works. If I ever have the time, I want to write some utilities to simplify setup and management of profiles. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634