[BusyBox] Problems with ash

Larry Doolittle ldoolitt at recycle.lbl.gov
Thu May 19 16:42:00 UTC 2005


On Thu, May 19, 2005 at 09:58:28AM -0400, Rob Landley wrote:
> The shell situation in busybox is a longstanding mess.

No argument there.

> An attempt was made to create a unified, configurable shell that could be 
> menuconfiged to be big or small by selecting features, but would have a 
> single codebase.  Unfortunately, the result was a fourth shell, hush, which 
> didn't unify anything.  (It didn't even replace lash, because it can't be 
> configured down as small as lash.)

Not exactly.  Hush was an attempt (mostly by me) to make a Bourne-style
shell much smaller than bash or even ash.  While I got a lot of the syntax
correct, the semantics aren't close enough to run many pre-existing scripts.
Adding a new superficially-compatible-but-not-really scripting language
is a bad idea, and I certainly didn't do so on purpose.  Thanks to
Vlad's cmdedit, though, it is fairly comfortable to use interactively.
Hush contains some code and concepts that could be recycled if someone
wanted to try again.

> I've meant to take a whack at the whole mess (probably by unifying lash and 
> hush, with a chainsaw if necessary, and then going after msh).

The easiest way to unify lash and hush is to delete hush.  ;-)
I don't think many people will mind.

> Having read through the ash codebase, unifying it with anything else is kind 
> of unlikely.  There doesnt' seem to be any actual specification for what it 
> does, and for half the shell scripts out there you still need bash anyway.

The goal is a POSIX shell.  Scripts that use bash-isms either
do so by accident, and should be fixed to stick to POSIX, or
are such monsters that they should be rewritten in a proper
language.

I remember a rumor that the original AT&T sh source code has now been
published.  Since that code ran on a PDP-11 in 32K of RAM, it might
be an interesting piece of work to study from and/or adapt to busybox.

     - Larry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/busybox/attachments/20050519/3696fe5d/attachment-0002.pgp 


More information about the busybox mailing list