get-boot-info
Szilard Matyas-Szegedi
szilard.matyas at gmail.com
Fri Dec 13 14:40:34 CET 2019
I might be missing something, but I don't see why that wait/poll section is
necessary as in the next section you poll for default route to be available
which will only be available if at least an interface other than loopback
with an IP address is up. Of course theoretically it is possible that
someone sets the default route manually pointing to the loopback interface.
:) But in that case boot.log will not be filled with or without waiting for
first active interface as NIC1 is empty. So I would simply remove that
section and keep only dummy variable. Let me know your thoughts.
Orig:
# first get first active network device
local dev dummy n
n=0
until [ $n = 7 ]; do
dev=$(ip ad show up | awk -F': ' '/^[0-9]/ && ! / lo:/ {print $2;exit}')
if [ -z "$dev" ]; then
sleep 2 # if interface needs some time to come up
else
break
fi
n=$(($n + 1))
done
Proposed:
local dummy
Kind Regards,
Szilard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20191213/087fa595/attachment.html>
More information about the linux-fai
mailing list