From owner-freebsd-mobile Sat Jul 7 12:11:44 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from moek.pir.net (moek.pir.net [130.64.1.215]) by hub.freebsd.org (Postfix) with ESMTP id E786137B403 for ; Sat, 7 Jul 2001 12:11:40 -0700 (PDT) (envelope-from pir@pir.net) Received: from pir by moek.pir.net with local (Exim) id 15IxUR-0007Eo-00 for freebsd-mobile@freebsd.org; Sat, 07 Jul 2001 15:11:39 -0400 Date: Sat, 7 Jul 2001 15:11:39 -0400 From: Peter Radcliffe To: freebsd-mobile@freebsd.org Subject: ifconfig wireless card options and DHCP Message-ID: <20010707151139.A27611@pir.net> Reply-To: freebsd-mobile@freebsd.org Mail-Followup-To: freebsd-mobile@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-fish: < X-Copy-On-Listmail: Please do NOT Cc: me on list mail. Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I noticed that the ifconfig changes for media options and for wireless card configuration ahve gone into -stable, been playing with them with my cisco 350 card and they seem to work well. Currently for setting the wireless card options I use a bunch of hacks to /etc/pccard_ether and lots of *control calls, but it would be nicer if these could now be done with ifconfig in one call. Seems like this would be easy currently for non-DHCP configured interfaces, but as soon as you specify DHCP in $ifconfig_${interface} you lose the ability to pass further arguments. In my opinion setting up some media options before DHCP is called could be generally useful with cards that need something to be forced before they will pass packets at all (such as 802.11b with WEP enabled). Looking at /etc/pccard_ether is looks like this patch would allow you to do things like: ifconfig_an0="DHCP wepmode on wepkey ThisIsAKey" I also added in a check for pccard_ether.local, since there are things I do at every interface up/down and I'd rather not keep maintaining changes between my pccard_ether script and the standard ones. What do people think ? P. ---------------------------------------------------------------------- *** /etc/pccard_ether.orig Sat Jul 7 13:17:54 2001 --- /etc/pccard_ether Sat Jul 7 15:10:28 2001 *************** *** 66,75 **** --- 66,91 ---- case ${ifconfig_args} in [Nn][Oo] | '') ;; + + [Dd][Hh][Cc][Pp][\ \ ]*) + # Do we have ifconfig arguments to do before we DHCP + # the interface ? + dhcp_ifconfig_args=`echo "${ifconfig_args}" \ + | sed 's/^[Dd][Hh][Cc][Pp][\ \ ]*//'` + + if [ "x$dhcp_ifconfig_args" != "x" ]; then + ifconfig ${interface} ${dhcp_ifconfig_args} $* + fi + + # Start up the DHCP client program + start_dhcp + ;; + [Dd][Hh][Cc][Pp]) # Start up the DHCP client program start_dhcp ;; + *) # Do the primary ifconfig if specified ifconfig ${interface} ${ifconfig_args} $* *************** *** 183,185 **** --- 199,205 ---- esac ;; esac + + if [ -x "$pccard_ether_local" ]; then + $pccard_ether_local $interface $startstop $@ + fi ---------------------------------------------------------------------- -- pir pir@pir.net pir@net.tufts.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message