mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user