Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: caminati on May 30, 2012, 06:34:35 AM
-
I've just learnt that busybox codebase provides four different shells:
http://lists.debian.org/debian-boot/2001/07/msg00104.html (http://lists.debian.org/debian-boot/2001/07/msg00104.html)
Since I like idle discussions about minimalism, I wonder if TinyCore team ever indulged in considering them as alternatives to the current ash in tcb.
There would probably be lots of compatibility troubles with current scripts...
-
You are referring to an 11 years old post. Are you sure that alternative shells still available in BusyBox?
-
As you like minimality why aren't you happy about ash? It's small and compatible, what else do you need?
-
http://git.busybox.net/busybox/tree/shell
-
Moving to something not-POSIX-sh-compatible doesn't really make sense for a linux distro, IMHO. I see the lesser shells as something for really minimal embedded systems, where one can afford to (re)write all scripts in that.
-
I asked the question for its own sake, and hoping to learn some interesting notion (this is appropriate for a forum, I guess); I am surely not so hopeful about further shrinking the current busybox.
That said, I object about the main point of some answers I got, that of adherence to a standard (POSIX).
First, I am not so sure that standardization is always the most critical goal.
Efficiency, neat design, modularity, etc... can conflict with that.
Secondly, compatibility should be relegated to a dedicated extension. I mean, IF it is possible to get away, in naked TCB, with a smaller (or even just somehow better, like plan9's rc), though not compatible shell, maybe it could be done, and then a separate ash.tcz be supplied for those wanting compatibility.
Others could use whatever they like: zsh, rc, pksh, or whatever.
Third, I regard some features normally included in shells as ugly duplications. For example the integer arithmetics construct $(()) can and should be replaced by a call to awk or whatever. I don't know if removing this from a shell would violate POSIX; if it did, I would like POSIX even less than I do now.
-
Since Busybox applications share code, using a simpler, less capable shell would likely not reduce the size.
Why fork another copy to use awk when the math code is already included for the busybox awk, and can easily be shared by $()?
-
I had thought about what you say and came to the conclusion that it's not worth it. A *lot* of stuff needs /bin/sh and if you were to replace all of that you could just as well write device drivers for your plan9 and ditch linux altogether.
Personally I use tinycorelinux because it allows me to use as little of the linux world as possible while still staying 99% compatible to most posix and standards considered mandatory nowadays.
If you want Plan 9 you know where to get it.