diff options
author | xengineering <mail2xengineering@protonmail.com> | 2020-03-22 14:14:35 +0100 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2020-03-22 14:14:35 +0100 |
commit | ba641a34c9da01914f4d971be57226ad37878399 (patch) | |
tree | 420d88852ca3cb21db5768575c7ee9a2bbbaf517 /archinstall.sh | |
parent | 54861b025565f527a35ee0628365bf62769577d0 (diff) | |
download | archinstall-ba641a34c9da01914f4d971be57226ad37878399.tar archinstall-ba641a34c9da01914f4d971be57226ad37878399.tar.zst archinstall-ba641a34c9da01914f4d971be57226ad37878399.zip |
Move boot_mode Check to archinstall.sh
Diffstat (limited to 'archinstall.sh')
-rw-r--r-- | archinstall.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/archinstall.sh b/archinstall.sh index 6e9f2ee..de09f83 100644 --- a/archinstall.sh +++ b/archinstall.sh @@ -83,11 +83,6 @@ export PACKAGE_LIST="base linux linux-firmware grub networkmanager nano" # mayb export DEFAULT_PASSWORD="archinstall" -# variables - -export boot_mode="unknown" # alternatives: "bios" or "uefi" - - # functions function print_ok () { @@ -104,6 +99,18 @@ function print_failed () { export -f print_failed +# check bootmode + +print_ok "Checking bootmode ..." +if [ -d "/sys/firmware/efi/efivars" ]; then + export boot_mode="uefi" + print_ok "Booted with UEFI" +else + export boot_mode="bios" + print_ok "Booted with legacy boot / BIOS" +fi + + # check internet connection if ping -w $INTERNET_TEST_PING_TIMEOUT -c 1 $INTERNET_TEST_SERVER; then |