From 33e55cffe600919b295f7a4fb0c621ba3b5db04e Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 17 Mar 2020 18:18:34 +0100 Subject: Implement if/elif Blocks for Partition Formatting --- stages/first_stage.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'stages') 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 -- cgit v1.2.3-70-g09d2