summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2019-06-19 23:55:44 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2019-06-20 00:05:46 +0200
commita311684c4ab0ec2cf3a3d11412295da52df63c88 (patch)
treeff97a1aab2b18d347b25f3bbc9a27ae58e5eed91
parentf3a87a2c2e339328ea4d7448f43d5317806a6b24 (diff)
downloadlvm2-a311684c4ab0ec2cf3a3d11412295da52df63c88.tar.gz
aux: fix selecting lvmconf values
For older bashes (i.e. rhel5) code can't use internal bash arrays and uses old-school greps and sorts to create configuration file. But the split of value was mismatching names with same prefix so i.e. devices/scan devices/scan_lvs was matching always the later one - fix this by expecting whitespace or '=' after the name.
-rw-r--r--test/lib/aux.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 86ed5548a..1db6fbff3 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1296,7 +1296,7 @@ EOF
echo "$s {"
local k
for k in $(grep ^"$s"/ "$config_values" | cut -f1 -d= | sed -e 's, *$,,' | sort | uniq); do
- grep "^$k" "$config_values" | tail -n 1 | sed -e "s,^$s/, ," || true
+ grep "^$k[ =]" "$config_values" | tail -n 1 | sed -e "s,^$s/, ," || true
done
echo "}"
echo