Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Aug 1998 16:07:09 -0400 (EDT)
From:      "Sean O'Connell" <sean@stat.Duke.EDU>
To:        FreeBSD mobile <freebsd-mobile@FreeBSD.ORG>
Subject:   /etc/pccard_ether
Message-ID:  <199808302007.QAA21222@cayenne.isds.duke.edu>

next in thread | raw e-mail | index | archive | help
Hi All-

I realize this probably picking a nit, but I was unable to get
/etc/pccard_ether (in -stable) to work with the pccard_ifconfig
option.  I have put together a quickie patch that is pretty
much a direct hack (stolen entirely from the PAO pccard_ether
for 2.2.6-RELEASE by HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>).
This fixes the handling of properly inserting the ifconfig_$interface
into the script.  Otherwise it falls flat on it's face.

I hope this patch (unified diff) helps some folks:

--- pccard_ether.bak	Sun Aug 30 15:58:13 1998
+++ pccard_ether	Sun Aug 30 15:57:47 1998
@@ -10,8 +10,14 @@
 	. /etc/rc.conf
 fi
 
+# catch the interface name (rest are additional args)
+interface=$1
+shift
+
 if [ "x$pccard_ifconfig" != "xNO" ] ; then
-	if [ "x$pccard_ifconfig" = "xDHCP" ] ; then
+	# get ifconfig line for the interface
+	eval ifconfig_args=\$ifconfig_${interface}
+	if [ "x$ifconfig_args" = "xDHCP" ] ; then
 		if [ -f /usr/local/sbin/dhclient ] ; then
 		    if [ -s /var/run/dhclient.pid ] ; then
 			kill `cat /var/run/dhclient.pid`
@@ -22,9 +28,7 @@
 		    echo "DHCP client software not available (isc-dhcp2)"
 		fi
 	else
-		interface=$1
-		shift
-		ifconfig $interface $pccard_ifconfig $*
+		ifconfig $interface $ifconfig_args $*
 	fi
 fi
 

-------------------------------------------------------------------------
Sean O'Connell                                  Email: sean@stat.Duke.EDU
Institute of Statistics and Decision Sciences   Phone: (919) 684-5419
Duke University                                 Fax:   (919) 684-8594

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



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