Commit 7d3b6e3e authored by Alessandro Rubini's avatar Alessandro Rubini

wrs-boot-procedure: check whether tftp failed and retry

Thanks to Cesar Prados for finding the problem
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 7e2c24fc
......@@ -81,7 +81,16 @@ if $install; then
# Eth0 is already up, thanks to ip= passed by bootloader
cd /update
echo -n "Getting tftp://$SERVERIP/$WRS_FW ..." | busybox tee /dev/ttyGS0
busybox tftp -g -r $WRS_FW -l $WRS_FW $SERVERIP
busybox tftp -g -r $WRS_FW -l $WRS_FW $SERVERIP 2>&1 | tee /dev/ttyGS0
while [ ! -f $WRS_FW ]; do
echo "Downloading tftp://$SERVERIP/$WRS_FW failed" | \
busybox tee /dev/ttyGS0
# this loops forever
sleep 5
busybox tftp -g -r $WRS_FW -l $WRS_FW $SERVERIP 2>&1 | tee /dev/ttyGS0
done
cd /; umount /update
echo " done" | busybox tee /dev/ttyGS0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment