[BusyBox] Ash *surprises*

David Douthitt ssrat at mailbag.com
Fri Aug 10 13:39:21 UTC 2001


Aaron Lehmann wrote:
> 
> On Fri, Aug 10, 2001 at 05:28:29PM +0400, Vladimir N. Oleynik wrote:
> > Do not make this ;-)
> > Unix must have /bin/echo /bin/test (or (sym)links)
> 
> Or just enable the echo and test busybox applets :-).

It wasn't that easy.  1) there were no echo and test binaries in the
file system when they were used; it was assumed that they were internal
to the shell.

Secondly, run the following test script:

export PATH=/sbin:/bin

echo "This is a test..."

[ -n "$PATH" ] && echo "success..."


...this script will work in standalone ash, but fail in busybox ash.

The fact that the program can be rewritten to fix isn't the issue; what
if there were hundreds of these?  I'd rather go the route of "least
surprise" and expect everything in busybox ash to work just like
standalone ash unless things are reconfigured by the user.





More information about the busybox mailing list