mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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
This commit is contained in:
parent
b5edd6da96
commit
ad2a9d04d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57144
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue