Busybox updated to version 1.32.0
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
1.1
Now do it with the full 'dc' utility. A syntax change is
required:
# dc -e '2.2 2 / p'
1
And again, with Busybox 1.32.0 (the latest):
# ./busybox dc -e '2.2 2 / p'
1
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'
1.1
Or, if you want 2 places:
# dc -e '2 k 2.2 2 / p'
1.10
What really makes this very annoying:
# ./busybox dc -e "2.2 2 * p"
4.4
...no need for that "k" operator!
Here are the scripts modified in WoofQ:
/0pre-t2
/rootfs-skeleton/usr/sbin/exploderpm
/rootfs-skeleton/usr/sbin/pmount
/rootfs-skeleton/usr/sbin/get-monitor-resolutions
/rootfs-skeleton/usr/sbin/hostname-set
/rootfs-skeleton/usr/sbin/delayedrun
/rootfs-skeleton/usr/sbin/easy-remaster
/rootfs-skeleton/usr/sbin/xinitrc_test
/rootfs-skeleton/usr/sbin/partview
/rootfs-skeleton/usr/local/pup_event/frontend_funcs
/rootfs-skeleton/usr/local/pup_event/frontend_change
/rootfs-skeleton/usr/local/shellcms/shellcms
/rootfs-skeleton/etc/rc.d/rc.sysinit
/0pre-t2-add
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