site  contact  subhomenews

Indirection in a shell script

February 10, 2017 — BarryK
I recently posted about a cool solution for doing sort of version numbers using busybox 'sort', when the full 'sort' (from coreutils) is not available:
http://bkhome.org/news/201702/sorting-version-numbers.html

Another cool solution is an implementation of variable indirection, when bash is not available. Bash has a special operator for indirection, like this: ${!PTR}.

Running in the initramfs however, there is only busybox. It does not support that "!" operator, however indirection is easy to implement, as explained here:
http://unix.stackexchange.com/questions/87941/how-achieve-variable-indirection-refer-to-a-variable-whose-name-is-stored-in-an

Back on the topic of the stability of a layered filesystem on the E200HA laptop, ever since I implemented the kernel boot parameter as described in my recent post, Easy Linux has been rock solid:
http://bkhome.org/news/201702/more-stability-issues-with-e200ha.html

There was one screen freeze when I first tried it, since then have been running Easy many hours, booted up many times, using it now, rock solid.
Still on aufs, will do a build with overlay f.s. soon, see if that is also stable.

Changing the subject again, BluePup, my bluetooth manager, is working, but needs some TLC. When I bootup, have to use the touchpad to click on the BluePup icon, then turn on the mouse, then it gets detected and works.
Obviously, it would be better if those steps were not required.

But BluePup is one of many things languishing well-down in the to-do list!

Comments

While on the subject of cool things, this something else, not cool exactly, but a good little fix.

I have fixed the freememapplet_tray tray applet, written in C, to work in Easy Linux.

But, it wouldn't compile. I had found the fix for this before, but couldn't remember. A quick search found the solution, posted by Puppy Forum member 'Saborima':

http://www.murga-linux.com/puppy/viewtopic.php?p=708320&sid=0687adc2be28b9b731465270f3809662#708320

The applet is now version 2.6, I will upload source and PET sometime.

Tags: linux, easy