From d84b67360b7fa69242a0153d230d071c223f1947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sat, 11 May 2024 13:36:06 +0200 Subject: [PATCH] install: Retry on passphrase mismatch --- install_scripts/ares.sh | 6 ++++-- install_scripts/neptune.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/install_scripts/ares.sh b/install_scripts/ares.sh index f43338b..24594ad 100755 --- a/install_scripts/ares.sh +++ b/install_scripts/ares.sh @@ -32,8 +32,10 @@ EOF # might take a bit for the new partion table to be updated in-kernel sleep 1 -cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}3 -cryptsetup --batch-mode open ${DEVICE}3 cryptpart +while : ; do + cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}3 + cryptsetup --batch-mode open --tries 1 ${DEVICE}3 cryptpart && break +done pvcreate /dev/mapper/cryptpart vgcreate vgbase /dev/mapper/cryptpart diff --git a/install_scripts/neptune.sh b/install_scripts/neptune.sh index a04280c..e7d3336 100755 --- a/install_scripts/neptune.sh +++ b/install_scripts/neptune.sh @@ -32,8 +32,10 @@ EOF # might take a bit for the new partion table to be updated in-kernel sleep 1 -cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}p3 -cryptsetup --batch-mode open ${DEVICE}p3 cryptpart +while : ; do + cryptsetup --batch-mode luksFormat --iter-time 1000 ${DEVICE}3 + cryptsetup --batch-mode open --tries 1 ${DEVICE}3 cryptpart && break +done pvcreate /dev/mapper/cryptpart vgcreate vgbase /dev/mapper/cryptpart