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