luks_format

This commit is contained in:
Marc Beninca 2024-11-20 09:31:53 +01:00
parent 04f64f68a8
commit c641c95c0d
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
3 changed files with 5 additions and 5 deletions

View file

@ -93,7 +93,7 @@ fs_wipe() {
fi fi
} }
luks_format() { sh_fs_luks_format() {
local passphrase="${1}" local passphrase="${1}"
local device="${2}" local device="${2}"
local label="${3}" local label="${3}"

View file

@ -92,7 +92,7 @@ rescue_wipe_0_init_hetzner_8_8() {
fs_raid_create \ fs_raid_create \
"crypt" "00000000:00000000:00000000:00000001" ${members} "crypt" "00000000:00000000:00000000:00000001" ${members}
# encrypt # encrypt
luks_format "${passphrase}" "/dev/md/crypt" sh_fs_luks_format "${passphrase}" "/dev/md/crypt"
# open # open
echo "${passphrase}" | echo "${passphrase}" |
cryptsetup luksOpen "/dev/md/crypt" "crypt" cryptsetup luksOpen "/dev/md/crypt" "crypt"
@ -107,7 +107,7 @@ rescue_wipe_2_make_hetzner_8_8() {
# read passphrase # read passphrase
passphrase="$(read_passphrase)" passphrase="$(read_passphrase)"
# encrypt # encrypt
luks_format "${passphrase}" "/dev/md/crypt" sh_fs_luks_format "${passphrase}" "/dev/md/crypt"
# open # open
echo "${passphrase}" | echo "${passphrase}" |
cryptsetup luksOpen "/dev/md/crypt" "crypt" cryptsetup luksOpen "/dev/md/crypt" "crypt"

View file

@ -36,7 +36,7 @@ rescue_wipe_0_init_ovh_vle2() {
# crypt / wipe # crypt / wipe
fs_wipe "${device}1" "1G" 1 fs_wipe "${device}1" "1G" 1
# crypt / encrypt # crypt / encrypt
luks_format "${passphrase}" "${device}1" sh_fs_luks_format "${passphrase}" "${device}1"
# crypt / open # crypt / open
echo "${passphrase}" | echo "${passphrase}" |
cryptsetup luksOpen "${device}1" "crypt" cryptsetup luksOpen "${device}1" "crypt"
@ -52,7 +52,7 @@ rescue_wipe_2_make_ovh_vle2() {
# read passphrase # read passphrase
passphrase="$(read_passphrase)" passphrase="$(read_passphrase)"
# crypt / encrypt # crypt / encrypt
luks_format "${passphrase}" "${device}1" sh_fs_luks_format "${passphrase}" "${device}1"
# crypt / open # crypt / open
echo "${passphrase}" | echo "${passphrase}" |
cryptsetup luksOpen "${device}1" "crypt" cryptsetup luksOpen "${device}1" "crypt"