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

Denys Vlasenko vda.linux at googlemail.com
Fri Nov 16 22:56:19 UTC 2018


On Wed, Nov 14, 2018 at 7:54 PM Ron Yorston <rmy at pobox.com> wrote:
> Denys Vlasenko wrote:
> >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.
>
> I suppose my concern is that it risks losing the distinctive features
> of the two types of script.
>
> My view is that 'scripted applets' should require configuration in the
> same way as native applets:
>
> - it should be possible to enable and disable them individually
> - they should be listed (in alphabetical order!) by 'busybox --help' and
>   'busybox --list'
> - they should be installed by 'busybox --install'
> - they should respond to 'busybox --help name' and 'name --help'
>
> The infrastructure for all of this is already present.
>
> Custom scripts on the other hand should require no configuration, apart
> from just dropping them in the 'embed' directory.  If 'embed' is empty
> the code to support custom scripts won't be present in the binary.
>
> I'd prefer to maintain this distinction and use the same 'embedded
> scripts' machinery to support deployment of both types of script.
>
> But if all embedded scripts are to be treated alike I think the
> implementation should tend towards that of native applets, even if
> that raises the bar for people who want to deploy custom scripts.

I basically agree.

How about this? - embed/ applets can have configuration.
If it exists, then they are visible in "make menuconfig"
and can be selected or deselected.
But if config is _absent_, they are included unconditionally.

This seems to cover both cases.

If you are ok with this, willing to cook a patch?


More information about the busybox mailing list