From d41e5ffe91c82b3b5c4df71ccdd491cbcaa1e7cf Mon Sep 17 00:00:00 2001 From: Tomas Vanagas Date: Sat, 22 Jul 2017 16:38:54 +0100 Subject: [PATCH] Added checking for internet Checks for internet in loop until we get internet --- install/install.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/install/install.sh b/install/install.sh index 5e17741..11b56b9 100755 --- a/install/install.sh +++ b/install/install.sh @@ -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