Lines 163-168
Link Here
|
163 |
fi |
163 |
fi |
164 |
} |
164 |
} |
165 |
|
165 |
|
|
|
166 |
# Fire up an interface to do nfs-mounts if this machine |
167 |
# was booted from a md_root |
168 |
# Use kenv to get the configuration vom dhcp like |
169 |
# /sys/nfsclient/nfs_vfsops.c does |
170 |
|
171 |
ifconfig_kenv() |
172 |
{ |
173 |
echo "trying to up an interface with options from kenv..." |
174 |
|
175 |
IF=`kenv | grep 'boot.netif.name' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` |
176 |
GW=`kenv | grep 'boot.netif.gateway' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` |
177 |
IP=`kenv | grep 'boot.netif.ip' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` |
178 |
NM=`kenv | grep 'boot.netif.netmask' | awk 'BEGIN {FS="="} {print $2}' | sed 's/"//g'` |
179 |
|
180 |
if [ ! "$1" = "$IF" ]; then |
181 |
return 0 |
182 |
fi |
183 |
|
184 |
echo "kenv: IF=$IF GW=$GW IP=$IP MASK=$NM" |
185 |
ifconfig $IF $IP netmask $NM up |
186 |
route add default $GW |
187 |
|
188 |
} |
189 |
|
166 |
# DEBUGGING |
190 |
# DEBUGGING |
167 |
# |
191 |
# |
168 |
# set -v |
192 |
# set -v |
Lines 176-181
Link Here
|
176 |
if [ ${dlv:=0} -ne 0 ] ; then |
200 |
if [ ${dlv:=0} -ne 0 ] ; then |
177 |
iflist=`ifconfig -l` |
201 |
iflist=`ifconfig -l` |
178 |
for i in ${iflist} ; do |
202 |
for i in ${iflist} ; do |
|
|
203 |
|
204 |
ifconfig ${i} | grep -q inet |
205 |
if [ $? -ne "0" ] ; then |
206 |
ifconfig_kenv ${i} |
207 |
fi |
208 |
|
179 |
set -- `ifconfig ${i}` |
209 |
set -- `ifconfig ${i}` |
180 |
while [ $# -ge 1 ] ; do |
210 |
while [ $# -ge 1 ] ; do |
181 |
if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then |
211 |
if [ "${bootp_ifc}" = "" -a "$1" = "inet" ] ; then |