We handle the case where an LVM's PV is stacked on top of a dm-crypt
device, but not the case where it's the other way around, where a LVM
LV contains a LUKS encrypted file system. Fix this oversight.
Addresses-Debian-Bug: #931387
Reported-by: Marc Haber <mh+debian-bugs@zugschlus.de>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
if [ -z "$devices" ]; then
return 0;
fi
- lsblk -o NAME,MOUNTPOINT,FSTYPE -P -n -p $devices | \
- grep FSTYPE=\"ext\[234\]\" | while read vars ; do
+ lsblk -o NAME,MOUNTPOINT,FSTYPE,TYPE -P -n -p $devices | \
+ grep FSTYPE=\"ext\[234\]\" | grep TYPE=\"lvm\" | \
+ while read vars ; do
eval "${vars}"
if [ "${scrub_all}" -eq 1 ] || [ -n "${MOUNTPOINT}" ]; then