[BusyBox] Problems with ash

Rob Landley rob at landley.net
Thu May 19 13:58:28 UTC 2005


On Thursday 19 May 2005 08:43 am, Mike Frysinger wrote:
> > Surely if the {..,..} construct is not standard Bourne then the pcmcia
> > script should start with #!/bin/bash or avoid using it?
>
> i think it is standard for sh shells, but busybox doesnt have a sh shell,
> it is just aliased to ash (or aliased to whatever shell you choose in the
> config) ...
> -mike

The shell situation in busybox is a longstanding mess.  We've got four 
different shells (ash, msh, hush, and lash) that really don't share any 
noticeable amounts of code.

Basically, lash is the minimalist script-running shell that sucks at being an 
interactive command prompt.  Ash and msh (the minix shell) were preexisting 
shells that got glued on to busybox.  So this is three different sizes of 
shell you can select, but it's not one design that you can add or remove 
functionality to with #ifdefs, but three nonoverlapping codebases.

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.)

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).  But it's 
pretty far down on my to-do list.  I need to finish rewriting umount and 
check all that in, and then probably dig up my old bzip rewrite and put 
_that_ in...

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.  
Probably the best thing is to start with the small shells and work our way up 
with bash (not ash) as the target.

Rob



More information about the busybox mailing list