[PATCH 1/3] Support both custom scripts and scripted applets

Denys Vlasenko vda.linux at googlemail.com
Wed Nov 14 15:59:08 UTC 2018


Apologies for late reply.

On Fri, Nov 9, 2018 at 12:50 PM Ron Yorston <rmy at pobox.com> wrote:
> BusyBox has support for embedded shell scripts.  Two types can be
> distinguished:  custom scripts and scripts implementing applets.
>
> All embedded scripts can be run by name and are subject to tab
> completion in standalone shell mode.
>
> Custom scripts are otherwise unsupported by BusyBox and are intended
> as a simple means for application-specific code to be included in
> the binary.  Such scripts should be placed in the 'embed' directory
> at build time.
>
> Applet scripts are integrated with the BusyBox build system and
> are intended to be used to ship standard applets that just happen
> to be implemented as scripts.  They can be configured at build time
> and appear just like native applets.

Yes, conceptually there are two distinct scenarios as you described -
applets which implement general utility function and "just happen
to be written in shell", and custom scripts added by the people
compiling the binary for their uses.

But there is no technical distinction between them.
Both are commands.

I propose to treat both of these types scripts the same way.

I have a feeling this will result in simpler code.

Let me know if you foresee difficulties with this approach.


More information about the busybox mailing list