fix crypt blacklist

This commit is contained in:
Tobias Powalowski 2022-01-27 19:28:01 +01:00
parent 1406dcaa97
commit 806f02e579

View file

@ -1177,10 +1177,10 @@ _luks()
activate_special_devices activate_special_devices
# Remove all crypt devices with children # Remove all crypt devices with children
CRYPT_BLACKLIST="$(for i in $(${_LSBLK} NAME,TYPE | grep " crypt$" | cut -d' ' -f1 | sort -u); do CRYPT_BLACKLIST="$(for i in $(${_LSBLK} NAME,TYPE | grep " crypt$" | cut -d' ' -f1 | sort -u); do
${_LSBLK} NAME "${i}" _ ${_LSBLK} NAME "${i}"
done)" done)"
PARTS="$(for i in $(findpartitions); do PARTS="$(for i in $(findpartitions); do
! echo "${CRYPT_BLACKLIST}" | grep -Eq "${i} _" && echo "${i}" _ echo "${CRYPT_BLACKLIST}" | grep -wq "${i}" || echo "${i}" _;
done)" done)"
# break if all devices are in use # break if all devices are in use
if [[ "${PARTS}" = "" ]]; then if [[ "${PARTS}" = "" ]]; then