From e3a6ce5ade05cbc067fe0aac2f0206d92873c962 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Tue, 4 Jun 2024 11:49:19 +0200 Subject: [PATCH] allow degraded raid --- usr/lib/archboot/installer/blockdevices.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/lib/archboot/installer/blockdevices.sh b/usr/lib/archboot/installer/blockdevices.sh index e3d841d57..48748fce1 100644 --- a/usr/lib/archboot/installer/blockdevices.sh +++ b/usr/lib/archboot/installer/blockdevices.sh @@ -453,6 +453,7 @@ _createmd() fi # select the first device to use, no missing option available! _RAIDNUMBER=1 + _DEGRADED="" #shellcheck disable=SC2086 _dialog --no-cancel --menu "Select device ${_RAIDNUMBER}:" 21 50 13 ${_DEVS} 2>"${_ANSWER}" || return 1 _DEV=$(cat "${_ANSWER}") @@ -473,7 +474,7 @@ _createmd() 21 50 13 ${_DEVS} "> MISSING" "Degraded Raid Device" "> DONE" "Proceed To Summary" 2>"${_ANSWER}" || return 1 fi _DEV=$(cat "${_ANSWER}") - if [[ "${_DEV}" == "> MISSING" ]]; then + if [[ "${_DEV}" == "> MISSING" && -z ${_DEGRADED} ]]; then _dialog --yesno "Would you like to create a degraded raid on ${_RAIDDEV}?" 0 0 && _DEGRADED="missing" echo "${_DEGRADED}" >>/tmp/.raid _DEV=""