Skip to content

Commit

Permalink
remove section
Browse files Browse the repository at this point in the history
This part not needed, since the next loop also waits until a default
route is available. This will ensure that at least an interface is up.
  • Loading branch information
Mrfai committed Dec 13, 2019
1 parent b95d560 commit 769f105
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lib/get-boot-info
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,7 @@ get_dhcp_info() {
setnet() {

# get network parameters
# 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
local dummy

# determine the name of the default network interface
# try several times if dhclient needs some more time
Expand Down

0 comments on commit 769f105

Please sign in to comment.