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

Ron Yorston rmy at pobox.com
Tue Nov 6 20:36:11 UTC 2018


Aaro Koskinen wrote:
>Should users be told they are enabling a scripted applet? E.g. in this
>case they should also enable some other busybox applets to make it work
>(like "cat")... I wonder how it's going to work in practice.

Because of the 'depends on ASH_EMBEDDED_SCRIPTS' we known that we have
a shell available, at least!

For the rest I suppose there are a couple of ways to look at it.  The
dependencies could be specified explicitly:

   depends on ASH_EMBEDDED_SCRIPTS && (ECHO || ASH_ECHO) && CAT && SLEEP

Though this means that scripted applets aren't very discoverable because
they'll only appear in the configuration menu if all their dependencies
are enabled first.

Alternatively the dependencies could be selected automatically:

   select ECHO
   select CAT
   select SLEEP

But in this case it wouldn't be possible to turn off sleep from the
configuration menu if nologin is enabled.  And it isn't obvious why.

Ron


More information about the busybox mailing list