Added checking for internet
Checks for internet in loop until we get internet
This commit is contained in:
parent
6cae165c7c
commit
d41e5ffe91
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue