1
0
Fork 0
mirror of synced 2024-11-22 01:55:36 -05:00

Add internet connectivity check

This commit is contained in:
Nico Jensch 2020-12-15 18:32:19 +01:00
parent 4c0ed983bf
commit 8e5394cd1c

View file

@ -1,4 +1,13 @@
#!/bin/bash #!/bin/bash
function goto
{
label=$1
cmd=$(sed -n "/^:[[:blank:]][[:blank:]]*${label}/{:a;n;p;ba};" $0 |
grep -v ':$')
eval "$cmd"
exit
}
function upgrade2ultimate function upgrade2ultimate
{ {
rm -rf /tmp/setup-assistant rm -rf /tmp/setup-assistant
@ -701,6 +710,26 @@ systemctl --user start psd >/dev/null 2>&1 &
libinput-gestures-setup autostart >/dev/null 2>&1 & libinput-gestures-setup autostart >/dev/null 2>&1 &
libinput-gestures-setup start >/dev/null 2>&1 & libinput-gestures-setup start >/dev/null 2>&1 &
: isup
wget -q --spider http://garudalinux.org
if [ $? -eq 0 ]; then
echo "Online"
else
if ! yad \
--image='update' \
--title="Setup Assistant" \
--window-icon='update' \
--geometry=700x100 \
--button=No:0 \
--button=Yes:1 \
--text-align=center \
--center \
--text "No internet connection available, try again?"; then
goto isup
else exit
fi
fi
if ! yad \ if ! yad \
--image='update' \ --image='update' \
@ -712,7 +741,7 @@ if ! yad \
--text-align=center \ --text-align=center \
--center \ --center \
--text "Do you want to get a recent mirrorlist?"; then --text "Do you want to get a recent mirrorlist?"; then
reflector-simple >/dev/null 2>&1 reflector-simple >/dev/null 2>&1
fi fi
if ! yad \ if ! yad \