Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Sep 2000 19:10:03 -0700 (PDT)
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: conf/21489: /etc/pccard_ether feature request
Message-ID:  <200009270210.TAA17814@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/21489; it has been noted by GNATS.

From: Brooks Davis <brooks@one-eyed-alien.net>
To: Danny Howard <dannyman@tellme.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/21489: /etc/pccard_ether feature request
Date: Tue, 26 Sep 2000 19:04:00 -0700

 On Fri, Sep 22, 2000 at 07:29:52PM -0700, Danny Howard wrote:
 > I'd think you could write a script to plug in for pre-config.
 
 After some additional thought this is basically the approach I'm taking.
 I've attached a diff which adds support like your's except that it adds
 it to both /etc/pccard_ether and /etc/rc.network.  It also provides a
 method by which this code can reset the ifconfig arguments in the
 preifconfig code.  The reason is that if you know which network you
 attached to you may know more about how to configure your IP address
 then you did before.  Of the three ways I though about integrating this,
 your's turned out to be the cleanest IMO.
 
 If any committer wants to add this code, I'd suggest
 investigating the possibility of removing rc.network's support for
 /etc/start_if.<interface> files in favor of preifconfig as you can always
 add back support with preifconfig like this:
 
 preifconfig_fxp0=". /etc/start_if.fxp0"
 
 and I doubt start_if.* is widely used.
 
 > The trick is how the system would determine appropriate settings for a card
 > before it can even determine the network it is on.  My hunch is that the wi
 > driver should be able to try a few different settings, but this is a lot more
 > work than the simple kludge suggested here, which will get a lot of folks like
 > me working right away. :)
 
 Following a suggestion from someone at BSDi who had a personal script
 that does this, I've created a script which does just that though his
 attempted to acquire an IP via DHCP to check for a connection and mine
 instead just checks to see if you are talking to someone with appropriate
 parsing of the wicontrol and (soon) ancontrol output and lets the existing
 ifconfig code handle actually configuring an interface.
 
 Since I've spent a fair bit of time on this, I've got to run it past our
 software release board before I can submit it for inclusion, but I'm
 hoping that won't take more then a couple weeks.  In the mean time, I
 fully support integrating the attached patch or something with
 equivalent functionality as it paves the way for a full solution (which
 should make your network configuration work right out of the box.)
 
 -- Brooks
 
 -- 
 Any statement of the form "X is the one, true Y" is FALSE.
 
 --- /usr/src/etc/pccard_ether	Wed Sep 13 23:21:48 2000
 +++ pccard_ether	Tue Sep 26 17:39:09 2000
 @@ -19,6 +19,16 @@
  interface=$1
  shift
  
 +preifconfig_ifconfig=""
 +preifconfig_interface=${interface}
 +eval preifconfig=\$preifconfig_${interface}
 +if [ -n "${preifconfig}" ]; then
 +	$preifconfig
 +fi
 +if [ -n "${preifconfig_ifconfig}" ]; then
 +	pccard_ifconfig=${ifconfig}
 +fi
 +
  case ${pccard_ifconfig} in
  [Nn][Oo] | '')
          ;;
 --- /usr/src/etc/rc.network	Wed Sep  6 22:56:31 2000
 +++ rc.network	Tue Sep 26 17:40:13 2000
 @@ -91,9 +91,20 @@
  			eval showstat_$ifn=1
  		fi
  
 +		preifconfig_ifconfig=""
 +		preifconfig_interface=${ifn}
 +		eval preifconfig=\$preifconfig_${interface}
 +		if [ -n "${preifconfig}" ]; then
 +			$preifconfig
 +		fi
 +
  		# Do the primary ifconfig if specified
  		#
 -		eval ifconfig_args=\$ifconfig_${ifn}
 +		if [ -n "${preifconfig_ifconfig}" ]; then
 +			ifconfig_args=${ifconfig}
 +		else
 +			eval ifconfig_args=\$ifconfig_${ifn}
 +		fi
  
  		case ${ifconfig_args} in
  		'')
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009270210.TAA17814>