[RFC PATCH v2] Allow applets to be implemented as scripts

Kang-Che Sung explorer09 at gmail.com
Wed Nov 7 08:38:26 UTC 2018


On Wed, Nov 7, 2018 at 3:42 PM Ron Yorston <rmy at pobox.com> wrote:
>
> Kang-Che Sung wrote:
> >Let no script applets individually configurable in menuconfig. Let users
> >resolve the dependencies of whatever they put in applets_sh.
>
> My view is that if script applets are provided as part of BusyBox they
> should have all the features of native applets, including the usual
> configuration facilities.
>
> The 'embed' directory is available for user-provided scripts.  These
> don't get the same level of support and it's up to the user to ensure
> their dependencies are met.
>
I have no opinion about embed directory in particular. My concern is about
potential config complexities if we ship script applets, especially non-trivial
ones.

All applets that you may implement as scripts have the potential to be
reimplemented in C. Rather than resolving applet dependencies for script
applets, making dependencies on only libc and libbb features could avoid all
dependency disasters we could have for introducing script applets.

Even seemingly trivial applet like nologin can bring in complexities. For
example, should I use echo or printf for printing messages? And what if choose
to _not_ support /etc/nologin.txt and use only hard-coded messages?

I think there is a potential for user to modify script applets heavily (for
their particular application). Trying to track dependencies after user
modification would be too much work for little benefit.

I would personally vote for that no script applets would be provided for
busybox, and that any script applet embedded in busybox would be user-provided
applet.


More information about the busybox mailing list