site  contact  subhomenews

Busybox updated to version 1.32.0

July 18, 2020 — BarryK

EasyOS, up until the latest version (2.3.3), has Busybox 1.28.4. This version was released in 2018 I think, quite old. I haven't updated so far, due to a problem with the 'dc' applet.

Running the 'dc' applet in Busybox 1.28.4:

# busybox dc 2.2 2 / p

Now do it with the full 'dc' utility. A syntax change is required:

# dc -e '2.2 2 / p'

And again, with Busybox 1.32.0 (the latest):

# ./busybox dc -e '2.2 2 / p'

There are a lot of scripts in EasyOS and in Puppy that execute the 'dc' utility. Simply correcting the syntax with the "-e" is in many case insufficient, due to the fractional part of the answer being truncated. There is no rounding up, just truncation of the fraction.

The correct syntax to get a fraction in the output is this:

# dc -e '1 k 2.2 2 / p'

Or, if you want 2 places:

# dc -e '2 k 2.2 2 / p'

What really makes this very annoying:

# ./busybox dc -e "2.2 2 * p"
4.4 need for that "k" operator!

Here are the scripts modified in WoofQ:


However, I want the scripts to work with both the old and new 'dc', so the scripts all have a test:

dc -e '' >/dev/null 2>&1 #200717 test if old dc, busybox <= 1.28.4
DCflg=$? #0=new bb.

...the old 'dc' gives a syntax error, the new 'dc' will return success. 

Tags: easy