bootp and multiple NICs improvement
Geert Stappers
Geert.Stappers at xs4all.nl
Fri Sep 28 16:32:56 CEST 2001
Hello,
On a computer with more then one network interface card,
I encountered strange behaviour.
After the
"""
Calling task_confdir
Kernel parameters:auto rw root=/dev/nfs
Defining variable: root=/dev/nfs
"""
the computer stopped.
But a half minute later it continued with
"""
* No response from BOOTP server
* bootpc failed to locate a network address
/fai mounted from faisrvr:/usr/local/share/fai
Calling task_setup
"""
So:
<screendump>
Calling task_confdir
Kernel parameters:auto rw root=/dev/nfs
Defining variable: root=/dev/nfs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~waiting~~~~~~~~~~
* No response from BOOTP server
* bootpc failed to locate a network address
/fai mounted from faisrvr:/usr/local/share/fai
Calling task_setup
</screendump>
For a newbie to FAI it was very odd.
After investigating what is going on,
it turn out that every is correct, only the user gets poor information.
I made an improvement, a patch is included.
Now the user will see what the computer is doing
and he/she won't see the bootpc errormessages
<screendump>
Calling task_confdir
Kernel parameters:auto rw root=/dev/nfs
Defining variable: root=/dev/nfs
Doing BOOTP requests on all found NICs
eth0
eth1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~waiting~~~~~~~~~~
/fai mounted from faisrvr:/usr/local/share/fai
Calling task_setup
</screendump>
Kind Regards, Geert Stappers
---------------------
The Future is now, be part of it.
# diff -u usr/share/fai/subroutines.box usr/share/fai/subroutines
--- usr/share/fai/subroutines.box Fri Sep 14 14:43:15 2001
+++ usr/share/fai/subroutines Fri Sep 28 13:59:56 2001
@@ -224,16 +224,23 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get_bootp_info() {
+ echo "Doing BOOTP requests on all found NICs"
local device
local bootlog=/tmp/bootp.log
- # define all bootpc information as variables
+
+ # on computers with more then one Network Interface Card
+ # the bootromNIC doesn't have to appear as eth0
+ # so all netdevices have to be checked
for device in $netdevices; do
- echo "# --- network device $device ---" >> $bootlog
- bootpc --dev $device --timeoutwait $timeout --returniffail >> $bootlog
+ echo "$device"
+ echo "* --- network device $device ---" >> $bootlog
+ bootpc --dev $device --timeoutwait $timeout \
+ --returniffail >> $bootlog 2>&1
done
[ -n "$verbose" -a -f $bootlog ] && echo "Reading $bootlog"
- eval `grep -v "^#" $bootlog`
+ # define all bootpc information as variables
+ eval `grep -v "^\*" $bootlog`
FAI_LOCATION=$T170
FAI_ACTION=$T171
FAI_FLAGS=$T172
More information about the linux-fai
mailing list