mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
test: Fix the way in_sync calculates the sync field location
'in_sync' was using the last field in the RAID status output as the location for the sync ratio field. The sync ratio may not always be the last field, but it will always be the 7th field. So we switch to using the absolute value rather than computing the last field index number.
This commit is contained in:
parent
31c24dd9f2
commit
69ae454d4d
@ -170,8 +170,8 @@ in_sync() {
|
||||
fi
|
||||
|
||||
if [ ${a[2]} = "raid" ]; then
|
||||
# Last argument is the sync ratio for RAID
|
||||
idx=$((${#a[@]} - 1))
|
||||
# 6th argument is the sync ratio for RAID
|
||||
idx=6
|
||||
type=${a[3]}
|
||||
elif [ ${a[2]} = "mirror" ]; then
|
||||
# 4th Arg tells us how far to the sync ratio
|
||||
|
Loading…
Reference in New Issue
Block a user