proper operation of "standalone shell"?

Rob Landley rob at landley.net
Fri Mar 3 18:56:01 UTC 2006


On Friday 03 March 2006 9:14 am, Robert P. J. Day wrote:
>   i was just reading the help for the "standalone shell" feature,
> specifically:
>
> "This option causes the selected busybox shell to use busybox applets
> in preference to executables in the PATH whenever possible.  For
> example, entering the command 'ifconfig' into the shell would
> cause busybox to use the ifconfig busybox applet."
>
>   now, to *me*, that suggests that if i *don't* configure the
> standalone shell feature, then busybox will first check for a command
> as a separate executable in my search path before looking for an
> applet by that name, but that's pretty clearly not what's happening.
>
>   (i tested this with a random applet, and busybox clearly tries to
> run the applet of that name and not the existing external executable.)

If the random applet was "echo", that's sometimes built-in separately.

Let's see...  make distclean, make defconfig, make menuconfig, disable 
standalone shell, make...

Ok, now set up a little testing thing...

$ cat > ls << EOF
#!/bin/sh
echo "Hello world!"
EOF
$ chmod +x ls

And now let's try:

landley at driftwood:~/busybox/busybox$ ./busybox ls README
README
landley at driftwood:~/busybox/busybox$ PATH=.:/bin ./busybox lash ls
Hello world!
lash: tcsetpgrp: Operation not permitted
landley at driftwood:~/busybox/busybox$ PATH=.:/bin ./busybox hush ls
Hello world!
landley at driftwood:~/busybox/busybox$ PATH=.:/bin ./busybox msh ls
Hello world!
landley at driftwood:~/busybox/busybox$ PATH=.:/bin ./busybox ash ls
Hello world!
landley at driftwood:~/busybox/busybox$ 

Seems pretty happy, except for lash being a bit confused about somebody 
actually running it from the command line. :)

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list