mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-23 21:35:29 +03:00
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.
This commit is contained in:
parent
f3a87a2c2e
commit
a311684c4a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user