diff options
author | Theodore Ts'o <tytso@mit.edu> | 2019-07-04 11:39:45 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2019-07-04 15:25:24 -0400 |
commit | 73c74fe26eed7ddd6341c71c47b068cd480684a4 (patch) | |
tree | 6b9bc36c4e9df1b954bee4352a35e36a16f569e8 /scrub | |
parent | 10c5c5e564206197384e794caca3baca6a970c63 (diff) | |
download | e2fsprogs-73c74fe26eed7ddd6341c71c47b068cd480684a4.tar.gz |
e2scrub_all: correctly handle the case where LUKS is stacked on an LV
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>
Diffstat (limited to 'scrub')
-rw-r--r-- | scrub/e2scrub_all.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scrub/e2scrub_all.in b/scrub/e2scrub_all.in index cdc37ced..24b2c681 100644 --- a/scrub/e2scrub_all.in +++ b/scrub/e2scrub_all.in @@ -102,8 +102,9 @@ ls_scan_targets() { 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 |