Wait 5*5 secs for network to be up (sats-install)

This commit is contained in:
xdrm-brackets 2017-09-27 16:26:41 +02:00
parent 40c1f82b26
commit b8011843d1
1 changed files with 11 additions and 3 deletions

View File

@ -30,10 +30,18 @@ fi;
# (x) If no network -> exit #
slog " * 4. Checking connectivity";
[ -z "`ping xdrm.io -q -c 1 -i 1 2>&1 > /dev/null`" ] \
&& slog " > done" \
|| failexit;
max_try=5;
while [ -n "`ping xdrm.io -q -c 1 -i 1 2>&1 > /dev/null`" ]; do
slog " > waiting for network";
max_try=`expr $max_try - 1`;
[ $max_try -lt 0 ] && failexit;
sleep 5;
done;
slog " > done";
# [1] Installation
#========================================================#