From d58afc82266630fb4533cdce5bf31d37005c6119 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 3 Oct 2023 09:54:01 +0200 Subject: [PATCH] open,close --- bash/hetzner-rescue.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bash/hetzner-rescue.sh b/bash/hetzner-rescue.sh index f19ab4a..929c262 100644 --- a/bash/hetzner-rescue.sh +++ b/bash/hetzner-rescue.sh @@ -243,12 +243,15 @@ function hetzner-rescue-wipe-12-10-10 { --use-random \ luksFormat \ '/dev/md/crypt' + # open + echo "${passphrase}" \ + | cryptsetup luksOpen '/dev/md/crypt' 'crypt' +#### + # close + cryptsetup luksClose 'crypt' } function hetzner-rescue-wipe-12-10-10-extra { - # open - echo "${passphrase}" \ - | cryptsetup luksOpen '/dev/sda1' 'crypt' # pv pvcreate '/dev/mapper/crypt' # vg @@ -263,6 +266,4 @@ function hetzner-rescue-wipe-12-10-10-extra { mkfs.ext4 -L 'data' '/dev/mapper/crypt-data' # vg off vgchange --activate n 'crypt' - # close - cryptsetup luksClose 'crypt' }