arvidjaar / bootinfoscript

71 stars 20 forks source link

Use bc to fix bash number limitation #13

Closed pevik closed 3 years ago

pevik commented 3 years ago

on big disc there is error on using bash expression $((end-start)), e.g. for start: 2048 and end: 1953523711:

bootinfoscript: line 2559: 1814421504S: value too great for base (error token is "1814421504S")

Signed-off-by: Petr Vorel petr.vorel@gmail.com

arvidjaar commented 3 years ago

The problem is not $((end-start)) expression but trailing S in 1814421504S. You need to find out where it comes from. I have no problem computing $((1953523711-2048)) in bash and this expression is not on line 2559 in any case.

Add set -x in the beginning of bootinfoscript, run it and show /tmp/BootInfo-*/Error_Log (it gets randomly generated name every time).

pevik commented 3 years ago

OK. Maybe using dash as a /bin/sh causes some incompatibilities.