The interface setup loop was adding every interface in ifconfig -l

to $configured_interfaces because it never checked to see if if it
actually configured that interface. For this reason it was setting
$configured_lo0 as well, so that never got configured, causing all
sorts of problems.
This commit is contained in:
cjs 1997-05-22 21:29:49 +00:00
parent 1a4cea1055
commit ab82fdc6b5

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $NetBSD: netstart,v 1.37 1997/05/17 14:12:24 lukem Exp $
# $NetBSD: netstart,v 1.38 1997/05/22 21:29:49 cjs Exp $
# from: @(#)netstart 8.1 (Berkeley) 7/23/93
if [ -f /etc/rc.conf ]; then
@ -53,15 +53,18 @@ if [ "$net_interfaces" != NO ]; then
fi
echo -n 'configuring network interfaces:'
for int in $tmp; do
didconfig=""
eval `echo 'args=$ifconfig_'$int`
if [ -n "$args" ]; then
echo -n " $int"
ifconfig $int $args
didconfig=yes
elif [ -f /etc/ifconfig.$int ]; then
echo -n " $int"
(while read args; do
ifconfig $int $args
done) < /etc/ifconfig.$int
didconfig=yes
else
if [ "$net_interfaces" != DEFAULT ]; then
echo
@ -71,10 +74,12 @@ if [ "$net_interfaces" != NO ]; then
fi
continue
fi
if [ "$int" = "lo0" ]; then
configured_lo0=yes
if [ -s "$didconfig" ]; then
if [ "$int" = "lo0" ]; then
configured_lo0=yes
fi
configured_interfaces="$configured_interfaces $int"
fi
configured_interfaces="$configured_interfaces $int"
done
echo '.'
fi