open,close
This commit is contained in:
parent
eeda17878a
commit
d58afc8226
1 changed files with 6 additions and 5 deletions
|
@ -243,12 +243,15 @@ function hetzner-rescue-wipe-12-10-10 {
|
||||||
--use-random \
|
--use-random \
|
||||||
luksFormat \
|
luksFormat \
|
||||||
'/dev/md/crypt'
|
'/dev/md/crypt'
|
||||||
|
# open
|
||||||
|
echo "${passphrase}" \
|
||||||
|
| cryptsetup luksOpen '/dev/md/crypt' 'crypt'
|
||||||
|
####
|
||||||
|
# close
|
||||||
|
cryptsetup luksClose 'crypt'
|
||||||
}
|
}
|
||||||
|
|
||||||
function hetzner-rescue-wipe-12-10-10-extra {
|
function hetzner-rescue-wipe-12-10-10-extra {
|
||||||
# open
|
|
||||||
echo "${passphrase}" \
|
|
||||||
| cryptsetup luksOpen '/dev/sda1' 'crypt'
|
|
||||||
# pv
|
# pv
|
||||||
pvcreate '/dev/mapper/crypt'
|
pvcreate '/dev/mapper/crypt'
|
||||||
# vg
|
# vg
|
||||||
|
@ -263,6 +266,4 @@ function hetzner-rescue-wipe-12-10-10-extra {
|
||||||
mkfs.ext4 -L 'data' '/dev/mapper/crypt-data'
|
mkfs.ext4 -L 'data' '/dev/mapper/crypt-data'
|
||||||
# vg off
|
# vg off
|
||||||
vgchange --activate n 'crypt'
|
vgchange --activate n 'crypt'
|
||||||
# close
|
|
||||||
cryptsetup luksClose 'crypt'
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue