warn_wipe

This commit is contained in:
Marc Beninca 2024-11-16 13:22:55 +01:00
parent cafe6ab80b
commit 213f6ae1f1
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
3 changed files with 11 additions and 7 deletions

View file

@ -10,10 +10,8 @@ rescue_wipe_0_init_hetzner_8_8() {
local passphrase
# read passphrase
passphrase="$(read_passphrase)"
#
lsblk
printf "%s" "WIPE ${*} /?\\ OR CANCEL /!\\"
read -r
# warn
warn_wipe "${@}"
#
number=0
for device in "${@}"; do

View file

@ -4,9 +4,7 @@ rescue_wipe_0_init_ovh_vle2() {
# read passphrase
passphrase="$(read_passphrase)"
# warn
lsblk
printf "%s" "WIPE ${device} /?\\ OR CANCEL /!\\"
read -r
warn_wipe "${device}"
#
parted --script "${device}" \
mktable gpt \

View file

@ -21,3 +21,11 @@ read_secret() {
echo "${secret}"
unset secret
}
warn_wipe() {
local tmp
lsblk --noempty
printf "%s" "WIPE ${*} /?\\ OR CANCEL /!\\"
read -r tmp
log_trace "${tmp}"
}