- Remove the pccard_ifconfig variable in favor of a new

ifconfig_DEFAULT variable.  Unlike pccard_ifconfig, ifconfig_DEFAULT
   applies to all interfaces that do not specify an ifconfig_<ifn>
   variable rather than just those listed in removable_interfaces.
 - Correct the list of interfaces when network_interfaces and
   removable_interfaces are both set by including removable_interfaces
   in the list of canidates.
 - When listing dhcp interfaces, include those with other ifconfig
   options so nat works.

Approved by:	re (network interface startup blanket)
This commit is contained in:
Brooks Davis 2005-06-30 05:02:34 +00:00
parent cbea18d9ae
commit 7657f59596
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147684
2 changed files with 14 additions and 34 deletions

View File

@ -21,6 +21,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 6.x IS SLOW:
developers choose to disable these features on build machines
to maximize performance.
20050629:
The pccard_ifconfig rc.conf variable has been removed and a new
variable, ifconfig_DEFAULT has been introduced. Unlike
pccard_ifconfig, ifconfig_DEFAULT applies to ALL interfaces that
do not have ifconfig_ifn entries rather than just those in
removable_interfaces.
20050610:
Major changes to network interface API. All drivers must be
recompiled. Drivers not in the base system will need to be

View File

@ -113,16 +113,11 @@ _ifconfig_getargs()
fi
eval _args=\$ifconfig_$1
if [ -z "$_args" -a -n "${pccard_ifconfig}" ]; then
for _if in ${removable_interfaces} ; do
if [ "$_if" = "$_ifn" ] ; then
_args=${pccard_ifconfig}
break
fi
done
if [ -z "$_args" ]; then
_args=$ifconfig_DEFAULT
fi
echo $_args
echo "$_args"
}
# ifconfig_getargs if
@ -394,7 +389,7 @@ list_net_interfaces()
_tmplist="`ifconfig -l`"
;;
*)
_tmplist="${network_interfaces} ${cloned_interfaces}"
_tmplist="${network_interfaces} ${removable_interfaces} ${cloned_interfaces}"
;;
esac
@ -408,37 +403,15 @@ list_net_interfaces()
_aprefix=
_bprefix=
for _if in ${_tmplist} ; do
eval _ifarg="\$ifconfig_${_if}"
case "$_ifarg" in
[Dd][Hh][Cc][Pp])
if dhcpif $_if; then
_dhcplist="${_dhcplist}${_aprefix}${_if}"
[ -z "$_aprefix" ] && _aprefix=' '
;;
''|*)
elif [ -n "`_ifconfig_getargs $if`" ]; then
_nodhcplist="${_nodhcplist}${_bprefix}${_if}"
[ -z "$_bprefix" ] && _bprefix=' '
;;
esac
fi
done
case ${pccard_ifconfig} in
[Dd][Hh][Cc][Pp])
for _if in ${removable_interfaces} ; do
_test_if=`ifconfig ${_if} 2>&1`
case "$_test_if" in
"ifconfig: interface $_if does not exist")
;;
*)
_dhcplist="${_dhcplist}${_aprefix}${_if}"
[ -z "$_aprefix" ] && _aprefix=' '
;;
esac
done
;;
*)
;;
esac
case "$type" in
nodhcp)
echo $_nodhcplist