summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2020-03-17 18:18:34 +0100
committerxengineering <mail2xengineering@protonmail.com>2020-03-17 18:18:34 +0100
commit33e55cffe600919b295f7a4fb0c621ba3b5db04e (patch)
tree3a7afeb3375163ff5270ffbf5ed88e2db9d9aa06
parent85efdc6c00d89cd42f2c91331c2df299e6c4e872 (diff)
downloadarchinstall-33e55cffe600919b295f7a4fb0c621ba3b5db04e.tar
archinstall-33e55cffe600919b295f7a4fb0c621ba3b5db04e.tar.zst
archinstall-33e55cffe600919b295f7a4fb0c621ba3b5db04e.zip
Implement if/elif Blocks for Partition Formatting
-rw-r--r--archinstall.sh2
-rw-r--r--stages/first_stage.sh23
2 files changed, 24 insertions, 1 deletions
diff --git a/archinstall.sh b/archinstall.sh
index 82f76d1..ddec69c 100644
--- a/archinstall.sh
+++ b/archinstall.sh
@@ -67,7 +67,7 @@ export DEFAULT_PASSWORD="archinstall"
export boot_mode="unknown" # alternatives: "bios" or "uefi"
export path_to_disk="/dev/null" # e.g. "/dev/sda"
-export luks_encryption="unknown" # alternatives: "yes" or "no"
+export luks_encryption="no" # alternative: "yes"
export path_to_timezone="/usr/share/zoneinfo/Europe/Berlin"
export locales_to_generate="de_DE.UTF-8 UTF-8;de_DE ISO-8859-1;de_DE@euro ISO-8859-15"
export keymap="de-latin1"
diff --git a/stages/first_stage.sh b/stages/first_stage.sh
index b8f31dd..dcd2cbd 100644
--- a/stages/first_stage.sh
+++ b/stages/first_stage.sh
@@ -51,6 +51,8 @@ fi
if [ "$boot_mode" == "uefi" ]; then
echo "Partitioning for UEFI mode."
+ echo "Sorry, this is still untested and you should not try it ..."
+ exit 1
wipefs -a $path_to_disk # make sure that fdisk does not ask for removing
# signatures which breaks the script
fdisk $path_to_disk << EOF
@@ -89,3 +91,24 @@ EOF
echo "Partitioned disk for BIOS/MBR - OK"
fi
+
+
+# Format partitions
+
+if [ "$luks_encryption" == "no" ];then
+ if [ "$boot_mode" == "bios" ];then
+ echo "no/bios"
+ elif [ "$boot_mode" == "uefi" ];then
+ echo "no/uefi"
+ else
+ echo "oh no"
+ fi
+elif [ "$luks_encryption" == "yes" ];then
+ if [ "$boot_mode" == "bios" ];then
+ echo "yes/bios"
+ elif [ "$boot_mode" == "uefi" ];then
+ echo "yes/uefi"
+ else
+ echo "oh no"
+ fi
+fi