diff options
author | Georg Pfuetzenreuter | 2022-11-29 12:27:06 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2022-11-29 12:27:06 +0100 |
commit | 15042704b931e02b4dbcfcee1d0dab586c4c16ef (patch) | |
tree | 9b3dd3d7de0ef6fcd28fb5fa1f6049605c1beb8c /makeluks.sh | |
download | opensuse-bootstrap-master.tar.gz opensuse-bootstrap-master.tar.bz2 opensuse-bootstrap-master.zip |
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'makeluks.sh')
-rwxr-xr-x | makeluks.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/makeluks.sh b/makeluks.sh new file mode 100755 index 0000000..e8ffdb0 --- /dev/null +++ b/makeluks.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -Ceux + +partswap="${1}3" +partroot="${1}4" +lukspass="$2" + +echo "$lukspass" | cryptsetup -q luksFormat "$partswap" +echo "$lukspass" | cryptsetup -q luksFormat "$partroot" + +echo "$lukspass" | cryptsetup -q luksOpen "$partswap" cr_swap +echo "$lukspass" | cryptsetup -q luksOpen "$partroot" cr_root |