nologin: make it possible to build it as single applet

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2020-06-24 13:39:13 +02:00
parent d5314e7129
commit 67e1529b92
5 changed files with 110 additions and 64 deletions

View File

@@ -17,6 +17,7 @@ choice
config SH_IS_ASH
depends on !NOMMU
bool "ash"
select SHELL_ASH
help
Choose ash to be the shell executed by 'sh' name.
The ash code will be built into busybox. If you don't select
@@ -25,6 +26,7 @@ config SH_IS_ASH
config SH_IS_HUSH
bool "hush"
select SHELL_HUSH
help
Choose hush to be the shell executed by 'sh' name.
The hush code will be built into busybox. If you don't select
@@ -57,6 +59,7 @@ choice
config BASH_IS_ASH
depends on !NOMMU
bool "ash"
select SHELL_ASH
help
Choose ash to be the shell executed by 'bash' name.
The ash code will be built into busybox. If you don't select
@@ -65,6 +68,7 @@ config BASH_IS_ASH
config BASH_IS_HUSH
bool "hush"
select SHELL_HUSH
help
Choose hush to be the shell executed by 'bash' name.
The hush code will be built into busybox. If you don't select
@@ -81,12 +85,12 @@ INSERT
comment "Options common to all shells"
if ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
if SHELL_ASH || SHELL_HUSH
config FEATURE_SH_MATH
bool "POSIX math support"
default y
depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
depends on SHELL_ASH || SHELL_HUSH
help
Enable math support in the shell via $((...)) syntax.
@@ -107,14 +111,14 @@ config FEATURE_SH_MATH_BASE
config FEATURE_SH_EXTRA_QUIET
bool "Hide message on interactive shell startup"
default y
depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
depends on SHELL_ASH || SHELL_HUSH
help
Remove the busybox introduction when starting a shell.
config FEATURE_SH_STANDALONE
bool "Standalone shell"
default n
depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
depends on SHELL_ASH || SHELL_HUSH
help
This option causes busybox shells to use busybox applets
in preference to executables in the PATH whenever possible. For
@@ -135,7 +139,7 @@ config FEATURE_SH_STANDALONE
config FEATURE_SH_NOFORK
bool "Run 'nofork' applets directly"
default n
depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
depends on SHELL_ASH || SHELL_HUSH
help
This option causes busybox shells to not execute typical
fork/exec/wait sequence, but call <applet>_main directly,
@@ -153,14 +157,14 @@ config FEATURE_SH_NOFORK
config FEATURE_SH_READ_FRAC
bool "read -t N.NNN support (+110 bytes)"
default y
depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
depends on SHELL_ASH || SHELL_HUSH
help
Enable support for fractional second timeout in read builtin.
config FEATURE_SH_HISTFILESIZE
bool "Use $HISTFILESIZE"
default y
depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
depends on SHELL_ASH || SHELL_HUSH
help
This option makes busybox shells to use $HISTFILESIZE variable
to set shell history size. Note that its max value is capped
@@ -169,7 +173,7 @@ config FEATURE_SH_HISTFILESIZE
config FEATURE_SH_EMBEDDED_SCRIPTS
bool "Embed scripts in the binary"
default y
depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
depends on SHELL_ASH || SHELL_HUSH
help
Allow scripts to be compressed and embedded in the busybox
binary. The scripts should be placed in the 'embed' directory