summaryrefslogtreecommitdiffstats
path: root/etc/pccard_ether
diff options
context:
space:
mode:
authornsayer <nsayer@FreeBSD.org>2000-02-11 14:49:42 +0000
committernsayer <nsayer@FreeBSD.org>2000-02-11 14:49:42 +0000
commit320ecd9d1ab6fb98b2bc3f4c83de344a1c613b94 (patch)
treecc1a6feac40fb54a49b48c9613f8173cc8616800 /etc/pccard_ether
parentba43d28ef05abb73b8ef3c02ef92acb1e2184948 (diff)
downloadFreeBSD-src-320ecd9d1ab6fb98b2bc3f4c83de344a1c613b94.zip
FreeBSD-src-320ecd9d1ab6fb98b2bc3f4c83de344a1c613b94.tar.gz
When running dhclient on a PC-Card insertion, specify the inserted
interface on the dhclient command line. Not doing so screws up vmware's network interface by attempting to configure it for DHCP (which will never work, of course). It also would impact any other interface that may be present that, again, would likely be manually configured for some other purpose. Approved by: jkh
Diffstat (limited to 'etc/pccard_ether')
-rwxr-xr-xetc/pccard_ether9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/pccard_ether b/etc/pccard_ether
index 2bc3a19..dafbc23 100755
--- a/etc/pccard_ether
+++ b/etc/pccard_ether
@@ -15,6 +15,9 @@ elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
+interface=$1
+shift
+
case ${pccard_ifconfig} in
[Nn][Oo] | '')
;;
@@ -24,20 +27,18 @@ case ${pccard_ifconfig} in
kill `cat /var/run/dhclient.pid`
rm /var/run/dhclient.pid
fi
- /sbin/dhclient
+ /sbin/dhclient $interface
elif [ -r /usr/local/sbin/dhcpc ]; then
if [ -s /var/run/dhcpc.pid ]; then
kill `cat /var/run/dhcpc.pid`
rm /var/run/dhcpc.pid
fi
- /usr/local/sbin/dhcpc $*
+ /usr/local/sbin/dhcpc $interface $*
else
echo "DHCP client software not available (isc-dhcp2)"
fi
;;
*)
- interface=$1
- shift
ifconfig ${interface} ${pccard_ifconfig} $*
;;
esac
OpenPOWER on IntegriCloud