From owner-freebsd-questions@FreeBSD.ORG Thu Sep 21 14:24:23 2006 Return-Path: X-Original-To: FreeBSD-Questions@FreeBSD.org 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 25C1116A407 for ; Thu, 21 Sep 2006 14:24:23 +0000 (UTC) (envelope-from bill@wiliweld.com) Received: from web31914.mail.mud.yahoo.com (web31914.mail.mud.yahoo.com [68.142.207.94]) by mx1.FreeBSD.org (Postfix) with SMTP id 8B60643D73 for ; Thu, 21 Sep 2006 14:24:22 +0000 (GMT) (envelope-from bill@wiliweld.com) Received: (qmail 4968 invoked by uid 60001); 21 Sep 2006 14:24:21 -0000 Message-ID: <20060921142421.4966.qmail@web31914.mail.mud.yahoo.com> Received: from [71.141.72.46] by web31914.mail.mud.yahoo.com via HTTP; Thu, 21 Sep 2006 07:24:21 PDT X-RocketYMMF: billschoolcraft Date: Thu, 21 Sep 2006 07:24:21 -0700 (PDT) From: Bill Schoolcraft To: FreeBSD-Questions@FreeBSD.org In-Reply-To: <20060918174011.GB31815@Grumpy.DynDNS.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: David Kelly Subject: Re: how to add flags to ifconfig at boot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bill@wiliweld.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Sep 2006 14:24:23 -0000 --- David Kelly wrote: > On Mon, Sep 18, 2006 at 12:38:30PM -0400, Robert Huff wrote: > > > > David Kelly writes: > > > > > Or if one needs to ifconfig earlier in the startup process then > put > > > one's script in /etc/start_if.em0 > > > > It is my understanding (and experience) this only works when > > > > ifconfig_em0="" > > > > in /etc/rc.conf. > > True only if your options for ifconfig in rc.conf would clear or > override whatever it is you put in /etc/start_if_em0. As long as its > something that can be done with multiple ifconfigs then all is fine. > > For example this works fine in /etc/start_if.xl0: > > #!/bin/sh > ifconfig xl0 lladdr 00:01:23:45:67:89 > > with this in rc.conf: > ifconfig_xl0="DHCP" > > -- > David Kelly N4HHE, dkelly@HiWAAY.net Thank you very much for the above info David, I've always been challenged with my (encrypted) wireless card though, and usually have my own manual script that I run. Always wanted to have it start "automagically" when/if it is the card I'm using. (question) Besides the single line you have in /etc/rc.conf above to instruct DHCP to be used, can one place all the following somehow in rc.conf or will I have to get this going in a script location? Currently I give my card a static ip but would like to have it grab it's ipaddr by DHCP, here is the majority of the script, omitted are my ping tests of the gateway at the end. TIA ######################### #!/bin/sh ifconfig wi0 ssid nwname ifconfig wi0 wepmode on ifconfig wi0 192.168.1.222 broadcast 192.168.1.255 netmask 255.255.255.0 ifconfig wi0 up wicontrol wi0 wepkey 0x1465466964 route add default 192.168.1.1 #########################