summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2019-12-22 14:37:59 +0100
committerxengineering <mail2xengineering@protonmail.com>2019-12-22 14:37:59 +0100
commitfc727bec9ca7c0ba1465bdd6b45ba262244191ab (patch)
tree145eda4ff427739bb1fb0632fed119dcff771a4e
parent0c9661f2d98f9464cc5d19eb5fac5cdc9fdc226b (diff)
downloadarchinstall-fc727bec9ca7c0ba1465bdd6b45ba262244191ab.tar
archinstall-fc727bec9ca7c0ba1465bdd6b45ba262244191ab.tar.zst
archinstall-fc727bec9ca7c0ba1465bdd6b45ba262244191ab.zip
Formatting and opening luks Partition works.
-rw-r--r--stages/first_stage.sh4
-rw-r--r--util/format_crypto_partition.sh6
-rw-r--r--util/open_crypto_partition.sh25
3 files changed, 28 insertions, 7 deletions
diff --git a/stages/first_stage.sh b/stages/first_stage.sh
index ba0590a..b2331f0 100644
--- a/stages/first_stage.sh
+++ b/stages/first_stage.sh
@@ -51,9 +51,9 @@ if [ $system_encryption == "yes" ];then
bash format_crypto_partition.sh $main_partition_path $DEFAULT_PASSWORD
- bash open_crypto_partition.sh
+ bash open_crypto_partition.sh $main_partition_path $DEFAULT_PASSWORD
- bash create_logical_volumes.sh
+ bash create_logical_volumes.sh $main_partition_path
fi
diff --git a/util/format_crypto_partition.sh b/util/format_crypto_partition.sh
index bde9a1e..97cdad4 100644
--- a/util/format_crypto_partition.sh
+++ b/util/format_crypto_partition.sh
@@ -22,8 +22,4 @@ main_partition_path=$1
DEFAULT_PASSWORD=$2
-cryptsetup luksFormat $main_partition_path << EOF
-YES
-$DEFAULT_PASSWORD
-$DEFAULT_PASSWORD
-EOF
+echo -n "$DEFAULT_PASSWORD" | cryptsetup luksFormat $main_partition_path -
diff --git a/util/open_crypto_partition.sh b/util/open_crypto_partition.sh
new file mode 100644
index 0000000..2a01c55
--- /dev/null
+++ b/util/open_crypto_partition.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+
+# archinstall - A minimal Installation Script for Arch Linux
+# Copyright (C) 2019 xengineering
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+
+main_partition_path=$1
+DEFAULT_PASSWORD=$2
+
+
+echo -n "$DEFAULT_PASSWORD" | cryptsetup open $main_partition_path main -