From 1b3c27be86c1827761345ee0acefaeb88ca343bc Mon Sep 17 00:00:00 2001 From: Jane Doe Date: Sat, 4 May 2024 15:09:51 +0000 Subject: [PATCH] An 'Internet Connection Check' stage has been added. The installer now checks for an active internet connection and exits if none is found. The 'UEFi Mode Check' stage now shows UEFI bitness. The 'System Clock Update' stage now shows relevant info. A few cosmetic changes took place. --- Amelia.sh | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/Amelia.sh b/Amelia.sh index 7a1bdef..669e368 100644 --- a/Amelia.sh +++ b/Amelia.sh @@ -89,7 +89,7 @@ err_try (){ abort (){ sleep 0.5 RED " - [!] Aborting.. + [!] Aborting.. " @@ -309,17 +309,15 @@ Enter a number: " ########################################################################################### uefi_check (){ - local prompt="UEFI Mode" + bootmode=$(cat /sys/firmware/efi/fw_platform_size) + local prompt="UEFI "${bootmode}"-bit Mode" sleep 0.5 NC " - - - ______________________________ ${purple}###${nc} UEFI Mode Verification ${purple}###${nc} " - if [[ -e /sys/firmware/efi/efivars ]]; then + if [[ "${bootmode}" == "64" || "${bootmode}" == "32" ]]; then ok else RED " @@ -328,6 +326,24 @@ ${purple}###${nc} UEFI Mode Verification ${purple}###${nc} fi } ########################################################################################### +connection_check (){ + + local prompt="Internet Connection" + sleep 0.5 + NC " +_________________________________ + +${purple}###${nc} Internet Connection Check ${purple}###${nc} + " + if ping -c 3 archlinux.org > /dev/null 2>&1; then + ok + else + RED " + [!] An active Internet connection is mandatory to continue " + abort + fi +} +########################################################################################### upd_clock (){ local prompt="System Clock" @@ -337,7 +353,7 @@ ___________________________ ${purple}###${nc} System Clock Update ${purple}###${nc} " - timedatectl set-ntp true + timedatectl ok } ########################################################################################### @@ -387,7 +403,7 @@ ${purple}###${nc} Main Menu ${purple}###${nc} [3] Disk Management - [4] Start Installation (${cyan}Auto-Navigation${nc}) " + [4] ${cyan}Start Auto-Navigated Installation${nc} " BLUE " @@ -4672,6 +4688,7 @@ NVIDIAHOOK ${bwhite}Press any key to start" read -s -n 1 uefi_check + connection_check upd_clock dtct_microcode until main_menu; do : ; done