aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-11-27 14:34:25 +0000
committerDenys Vlasenko <vda.linux@googlemail.com>2018-11-27 16:13:07 +0100
commit71df2d3589e3e682cd6770f41f0b184841b78702 (patch)
tree0c71963e9d622bc48256a3917c1ce55ccc019a4f /shell/ash.c
parentf4709d78cb0c4f54283046e8f86edb9ecd7e41ca (diff)
downloadbusybox-w32-71df2d3589e3e682cd6770f41f0b184841b78702.tar.gz
busybox-w32-71df2d3589e3e682cd6770f41f0b184841b78702.tar.bz2
busybox-w32-71df2d3589e3e682cd6770f41f0b184841b78702.zip
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>
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 04e4006c8..9ce1d1a76 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -148,20 +148,6 @@
148//config: you to run the specified command or builtin, 148//config: you to run the specified command or builtin,
149//config: even when there is a function with the same name. 149//config: even when there is a function with the same name.
150//config: 150//config:
151//config:config ASH_EMBEDDED_SCRIPTS
152//config: bool "Embed scripts in the binary"
153//config: default y
154//config: depends on ASH || SH_IS_ASH || BASH_IS_ASH
155//config: help
156//config: Allow scripts to be compressed and embedded in the busybox
157//config: binary. The scripts should be placed in the 'embed' directory
158//config: at build time. Like applets, scripts can be run as
159//config: 'busybox SCRIPT ...' or by linking their name to the binary.
160//config:
161//config: This also allows applets to be implemented as scripts: place
162//config: the script in 'applets_sh' and a stub C file containing
163//config: configuration in the appropriate subsystem directory.
164//config:
165//config:endif # ash options 151//config:endif # ash options
166 152
167//applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP)) 153//applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP))
@@ -195,7 +181,7 @@
195#include <sys/times.h> 181#include <sys/times.h>
196#include <sys/utsname.h> /* for setting $HOSTNAME */ 182#include <sys/utsname.h> /* for setting $HOSTNAME */
197#include "busybox.h" /* for applet_names */ 183#include "busybox.h" /* for applet_names */
198#if ENABLE_ASH_EMBEDDED_SCRIPTS 184#if ENABLE_FEATURE_SH_EMBEDDED_SCRIPTS
199# include "embedded_scripts.h" 185# include "embedded_scripts.h"
200#else 186#else
201# define NUM_SCRIPTS 0 187# define NUM_SCRIPTS 0