1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

tests: correct checked target name

So when the target name happened to be a suffix of another one,
the grep was filtering incorrect line
(i.e. dm-cache && dm-writecache) - so do a line head matching.
This commit is contained in:
Zdenek Kabelac 2019-06-11 16:40:44 +02:00
parent e225bf59ff
commit c9203a6106

View File

@ -1421,7 +1421,7 @@ target_at_least() {
fi
local version
version=$(dmsetup targets 2>/dev/null | grep "${1##dm-} " 2>/dev/null)
version=$(dmsetup targets 2>/dev/null | grep "^${1##dm-} " 2>/dev/null)
version=${version##* v}
version_at_least "$version" "${@:2}" || {