[BusyBox] Ash *surprises*

Vladimir N. Oleynik dzo at simtreas.ru
Fri Aug 10 07:53:21 UTC 2001


David,

> I replaced a modified standalone ash with busybox ash; it was worth it.
> However, it created quite a few problems, and many surprises.  There's a
> few bugs, too.
> 
> Here's a list (with comparisons)
> 
> 1. read -p silently ignored (previously worked)

Now we quick correct it.
1) find readcmd()
2) change putpromt to out2str and remove flushall (O, size optimization!)


> 2. getopts removed; does not exist in busybox ash

Hmm, see comment in ash.c. Not removed.

> 3. echo removed and now external
> 4. test removed and now external

I think, that it is reasonable for a policy busybox.

> 5. sh -x does not work
> 6. IFS="," ; set -- $FOO ...where FOO="a, b, c, d" acts differently:
>    ash:    returns: $1=a $2=b $3=c $4=d
>    bb ash: returns: $1=" a" $2=" b" $3=" c" $4=" d"
>    ...setting IFS to ", " restores the desired behavior.

This not quick correct...
 
> One of the problems I had with echo and test being external was that I
> set PATH=/bin:/sbin at one point; however, echo and test are in
> /usr/bin; thus all of echo and [ failed miserably.

Do not make this ;-) 
Unix must have /bin/echo /bin/test (or (sym)links)

> Despite failing the "principle of least surprise" this switch has been
> of GREAT benefit to my distribution; it's meant being able to split GNU
> libc to a separate archive, which means the switch to a new GNU glibc
> only requires a new archive, AND it shrunk the main root filesystem
> archive by almost 500k!

Hmm,  For a long time it was time so to make! ;))


--w
vodz





More information about the busybox mailing list