From 7a704d055b67efdcee12bed8ff9bf432bca57c6c Mon Sep 17 00:00:00 2001 From: Vladislav Date: Fri, 6 May 2022 15:56:37 +0300 Subject: [PATCH] check internet connectivity before installation --- airootfs/usr/local/bin/holoinstall | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/airootfs/usr/local/bin/holoinstall b/airootfs/usr/local/bin/holoinstall index 9d28c53..a460a94 100755 --- a/airootfs/usr/local/bin/holoinstall +++ b/airootfs/usr/local/bin/holoinstall @@ -7,6 +7,15 @@ CPU_VENDOR=$(cat /proc/cpuinfo | grep 'vendor' | uniq | cut -c 13-) SYSTEM_LOCALE="${SYSTEM_LOCALE:-en_US.UTF-8 UTF-8}" HOLO_INSTALL_DIR="${HOLO_INSTALL_DIR:-/mnt}" +# Internet connectivity check +wget -q --spider http://google.com +if [ $? -eq 0 ]; then + echo "Internet check passed" +else + echo -e "No Internet connection available, exiting\nUse wifi-menu util to connect WiFi" + exit +fi + if [[ "${CPU_VENDOR}" == "AuthenticAMD" ]]; then UCODE_INSTALL_MSG="AMD CPU detected, installing AMD ucode..." UCODE_INSTALL="amd-ucode"