forked from Bitmessage/sysdeploy
fix: don't list versions of unused partitions
This commit is contained in:
parent
da6118b6a0
commit
66012a64b6
|
@ -79,7 +79,8 @@ function version_from_partnum
|
|||
local partnum="$2"
|
||||
version="$(parted -m "$drive" -- print|awk -F: \
|
||||
-v partnum="$partnum" \
|
||||
'{if (NR > 2 && $1 == partnum) {
|
||||
'{if (NR > 2 && $1 == partnum && $1 >= 2 && $1 <= 4 &&
|
||||
$6 != "root unused") {
|
||||
print $6
|
||||
}}')"
|
||||
version="$(echo "$version"|cut -d\ -f2)"
|
||||
|
|
|
@ -25,6 +25,7 @@ function test_partitioning()
|
|||
|
||||
find_unused "$img"
|
||||
assertEquals "find_unused" 3 "$unused"
|
||||
assertEquals "version_from_partnum unused" "" "$unused"
|
||||
|
||||
rename_partition "$img" 3 "root $min_version"
|
||||
find_oldest "$img"
|
||||
|
|
Loading…
Reference in New Issue
Block a user