More bbsh design notes.

Rob Landley rob at landley.net
Mon Sep 11 21:28:26 UTC 2006


On Monday 11 September 2006 4:47 am, Ian Oliver wrote:
> In article <200609101740.02677.rob at landley.net>, Rob Landley wrote:
> > I don't expect anybody but me to actually 
> > use it yet.)
> 
> Given how little actual pleasure I'm getting from the current shell 
> collection on uClinux, I might be one of your first customers!

I'm all for it. :)

> Working control terminal from telnetd would be great.

I've been working on terminal control today.  (Ok, in reality I just spent a 
couple hours helping make slides for upper management about a source control 
migration proposal, and now I'm catching up on my email, but I'm _trying_ to 
work on terminal control for bbsh.)

> And even simple  
> scripting would be a delight (hush still won't handle anything complex 
> for me, probably due to duff forking)

Well, right now it does simple scripting, but doesn't have any actual flow 
control or pipes.  I'll probably do pipes next, which covers parsing | || & 
&& > >> < << ; and ().  Flow control covers if, for, while, and function 
definitions with curly brackets.

After those two I've got a dozen other config options queued up already in 
need of fleshing out, with more to come.

> I'm currently writing all my CGI scripts in C.
> And I notice that the manufacturers of the box have some abandoned 
> scripts for udhcpc to call in their samples source directory, so they 
> hit the same issue.

Someday I plan to write a dhcp client for busybox where calling a script will 
be optional rather than required.  I don't see why this wasn't an obvious 
thing to do in the first place.

> They have then switched to hacking udhcpc/script.c  
> to remove the script calling and directly add the calls to ifconfig and 
> generation of smb.conf !!!!

*shrug*  If the script doesn't exist, or returns 0, the dhcp client should 
call ifconfig and route, and write resolv.conf.

> I don't suppose you have any kind of timescale thing, do you?

Well, shell/bbsh.c is in svn already.  It's not in the config system but you 
can build it my doing a make defconfig && make and then 
running "scripts/individual bbsh".  That'll create build/bbsh as a standalone 
executable.  (I should probably get the dependency checking for 
scripts/individual a little more intelligent...)

There's debug stuff for the config options at the top of the file (cleaned u p 
a bit in my current version), and I leaked a help entry for it into 
include/usage.h yesterday because I wasn't motivated enough to yank it when 
checking in something else.

I'll add it to the config system when I've got it up to replacing lash.c and 
can thus yank lash, but I need to implement a lot more stuff first.  I am 
hoping to have it replace lash before 1.3.0 ships in december, but how much 
more than that I'll get done is an open question.

> Ian

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list