mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
add comment, move sleep to the beginning
This commit is contained in:
parent
2d3edeea68
commit
bb8e6ae7f0
1 changed files with 3 additions and 2 deletions
|
@ -200,14 +200,15 @@ _network() {
|
|||
# add sleep here for systemd-resolve get correct values
|
||||
_COUNT=0
|
||||
while true; do
|
||||
sleep 1
|
||||
if getent hosts www.google.com &>"${_LOG}"; then
|
||||
_dialog --infobox "Network configuration completed successfully." 3 50
|
||||
sleep 2
|
||||
return 0
|
||||
fi
|
||||
_COUNT=$((_COUNT+1))
|
||||
[[ "${_COUNT}" == 5 ]] && break
|
||||
sleep 1
|
||||
# abort after 10 seconds
|
||||
[[ "${_COUNT}" == 10 ]] && break
|
||||
done
|
||||
if ! getent hosts www.google.com &>"${_LOG}"; then
|
||||
_dialog --title " ERROR " --infobox "Your network is not working correctly, please configure again!" 3 60
|
||||
|
|
Loading…
Reference in a new issue