ensure DNS works, per dark_pyrro suggestion

qol_fixes
Dallas Winger 2024-08-29 11:12:50 -04:00
parent 5ec2535bc1
commit b0c2e96ea2
No known key found for this signature in database
GPG Key ID: 59CE387CBF3FCA01
2 changed files with 10 additions and 0 deletions

View File

@ -101,6 +101,11 @@ check_for_internet() {
echo "You must have an internet connection to check for updates." echo "You must have an internet connection to check for updates."
exit 0 exit 0
fi fi
if ! ping -q -c 1 -W 1 google.com &>/dev/null 2>&1; then
echo "You must have an internet connection with working DNS to check for updates."
exit 0
fi
} }
check_for_upgrade() { check_for_upgrade() {

View File

@ -7,6 +7,11 @@ check_for_internet() {
echo "You must have an internet connection to sync the payload libraries." echo "You must have an internet connection to sync the payload libraries."
exit 0 exit 0
fi fi
if ! ping -q -c 1 -W 1 google.com &>/dev/null 2>&1; then
echo "You must have an internet connection with working DNS to check for updates."
exit 0
fi
} }
cleanup_tmp() { cleanup_tmp() {