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:
parent
e225bf59ff
commit
c9203a6106
@ -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}" || {
|
||||
|
Loading…
Reference in New Issue
Block a user