Use "ifconfig -l" instead of "list_network_interfaces all" in

ifnet_rename() to support situations where rc.conf's $network_interfaces
variable is set to an explicit list of network interfaces (instead of
the default "auto").

Using "list_network_interfaces all" resulted in using
$network_interfaces for both interface _renaming_ and interface
_configuration_ which obviously cannot work either before (if the
new name is in $network_interfaces) or after (if the old name is in
$network_interfaces) renaming the interface.
This commit is contained in:
Ralf S. Engelschall 2004-12-05 09:51:48 +00:00
parent 9edbeba781
commit 18c3f40e94
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138386

View File

@ -256,7 +256,7 @@ ipx_down()
ifnet_rename()
{
_ifn_list="`list_net_interfaces all`"
_ifn_list="`ifconfig -l`"
[ -z "$_ifn_list" ] && return 0
for _if in ${_ifn_list} ; do
eval _ifname=\$ifconfig_${_if}_name