Previous blacklist checking was a bit overzealous: e.g. if /dev/sdb1 was
blacklisted (e.g. because it would contain the system-wide persistence COW
device), any other device whose name contains the blacklist one, such as
/dev/sdb11, was also be blacklisted.
do
devname=$(sys2dev "${dev}")
- if echo "${black_listed_devices}" | grep -q "${devname}"
+ if echo "${black_listed_devices}" | grep -q -w "${devname}"
then
# skip this device enterely
break
devname=$(sys2dev "${dev}")
devfstype="$(get_fstype ${devname})"
- if echo "${black_listed_devices}" | grep -q "${devname}"
+ if echo "${black_listed_devices}" | grep -q -w "${devname}"
then
# skip this device enterely
break