luks-functions: cleanup code of luks containers reported

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
This commit is contained in:
Thierry Laurion 2023-10-31 13:05:36 -04:00
parent 4d72eb3120
commit 2aa9cfafb5
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93

View File

@ -10,8 +10,7 @@ list_luks_devices() {
#generate a list of devices to choose from that contain a LUKS header
lvm vgscan || true
blkid | cut -d ':' -f 1 | while read device; do
cryptsetup isLuks $device
if [ $(echo $?) == 0 ]; then echo $device; fi
if cryptsetup isLuks $device; then echo $device; fi
done | sort
}