board/netconf: Properly format disks of non-MiB-aliged sizes

awk(1) will dutifully represented the size as a float, but test(1) was
not at all amused.
This commit is contained in:
Tobias Waldekranz
2024-03-19 15:07:44 +01:00
parent f1b8599afb
commit 873de8d0b7
@@ -8,7 +8,7 @@ bootoffs=$2
bootsize=8M
auxsize=8M
total=$(awk -vdisk="$(basename $disk)" '$4 == disk { print($3 / 1024); }' /proc/partitions)
total=$(awk -vdisk="$(basename $disk)" '$4 == disk { print(int($3 / 1024)); }' /proc/partitions)
if [ "$total" -ge 4096 ]; then
imgsize=1024M
cfgsize=512M