On Sat, Apr 19, 2025, at 3:42 PM, James Cloos wrote: >>>>>> "ZW" == Zack Weinberg <z...@owlfolio.org> writes: > > ZW> this _only_ works because busybox's implementation of the shell language > ZW> knows all the commands that are implemented by busybox. if you want to > ZW> use busybox together with a different shell then you do have to create > ZW> all the symlinks. > > no, that is most certainly *not* how busybox works.
You are mistaken. busybox's manpage only describes the behavior of individual busybox commands, not the behavior of busybox's built-in shell. The clearest documentation I can find for the behavior I was talking about is embedded in <https://git.busybox.net/busybox/tree/shell/Config.src>: # config FEATURE_SH_STANDALONE # bool "Standalone shell" # default n # depends on SHELL_ASH || SHELL_HUSH # help # This option causes busybox shells 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. Specifying the fully # qualified executable name, such as '/sbin/ifconfig' will still # execute the /sbin/ifconfig executable on the filesystem. This option # is generally used when creating a statically linked version of busybox # for use as a rescue shell, in the event that you screw up your system. And I know that this works because my main workstation's initrd wouldn't function otherwise. The text I quoted looks like this is an optional mode that's off by default, but it would not make sense to install _just_ the busybox binary and not the individual command symlinks, unless you did enable that option. It would be ridiculously tedious and error-prone to have to insert "busybox " in front of all the standard commands in a complex shell script. zw