hush: allow hush to run embedded scripts

Embedded scripts require a shell to be present in the BusyBox
binary.  Allow either ash or hush to be used for this purpose.
If both are enabled ash takes precedence.

The size of the binary is unchanged in the default configuration:
both ash and hush are present but support for embedded scripts
isn't compiled into hush.

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Ron Yorston authored and Denys Vlasenko committed 2018-11-27 16:13:07 +01:00
1 parent f4709d78cb
commit 71df2d3589
10 files changed
+62 -32

No files matched your search

+5
View File
@@ -1348,6 +1348,11 @@ int ash_main(int argc, char** argv)
MAIN_EXTERNALLY_VISIBLE
#endif
;
int hush_main(int argc, char** argv)
#if ENABLE_HUSH || ENABLE_SH_IS_HUSH || ENABLE_BASH_IS_HUSH
MAIN_EXTERNALLY_VISIBLE
#endif
;
/* If shell needs them, they exist even if not enabled as applets */
int echo_main(int argc, char** argv) IF_ECHO(MAIN_EXTERNALLY_VISIBLE);
int printf_main(int argc, char **argv) IF_PRINTF(MAIN_EXTERNALLY_VISIBLE);