Added checking for internet

Checks for internet in loop until we get internet
This commit is contained in:
Tomas Vanagas 2017-07-22 16:38:54 +01:00 committed by GitHub
parent 6cae165c7c
commit d41e5ffe91
1 changed files with 15 additions and 2 deletions

View File

@ -48,8 +48,6 @@ if [ -z "${DISPLAY:-}" ]; then
exit 1
fi
function mostrarheader(){
conditional_clear
@ -153,6 +151,21 @@ function installer {
conditional_clear
mostrarheader
#Check internet connection
wget -q --spider http://google.com
internet=$?
if [ "$internet" != "0" ]; then
echo "Waiting for internet connection..."
while [ "$internet" != "0" ]
do
sleep 1
wget -q --spider http://google.com
internet=$?
done
fi
echo "Updating system..."
#cleaning up