multiple default routes mess up installation (#210)
In case multiple default routes on different network interfaces are defined, installation is messed up exiting awk script after first hit should resolve this issue
This commit is contained in:
parent
6adb847f90
commit
d79ea23c2b
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ while ! ping -c 1 -W 1 ${URL_VERSION_HOST}; do
|
|||
done
|
||||
|
||||
# Get primary network interface
|
||||
PRIMARY_INTERFACE=$(ip route | awk '/^default/ { print $5 }')
|
||||
PRIMARY_INTERFACE=$(ip route | awk '/^default/ { print $5; exit }')
|
||||
IP_ADDRESS=$(ip -4 addr show dev "${PRIMARY_INTERFACE}" | awk '/inet / { sub("/.*", "", $2); print $2 }')
|
||||
|
||||
case ${ARCH} in
|
||||
|
@ -160,4 +160,4 @@ info "machine: http://${IP_ADDRESS}:8123"
|
|||
if [ -f /var/run/reboot-required ]
|
||||
then
|
||||
warn "A reboot is required to apply changes to grub."
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue