2014-01-31 13:50:16 +00:00
|
|
|
# DO NOT EDIT. This file is generated from Config.src
|
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2019-02-27 03:23:45 +00:00
|
|
|
# see docs/Kconfig-language.txt.
|
2014-01-31 13:50:16 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
menu "Shells"
|
|
|
|
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Choose which shell is aliased to 'sh' name"
|
|
|
|
default BUSYBOX_CONFIG_SH_IS_ASH
|
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Choose which shell you want to be executed by 'sh' alias.
|
|
|
|
The ash shell is the most bash compatible and full featured one.
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
# note: cannot use "select ASH" here, it breaks "make allnoconfig"
|
|
|
|
config BUSYBOX_CONFIG_SH_IS_ASH
|
|
|
|
depends on !BUSYBOX_CONFIG_NOMMU
|
|
|
|
bool "ash"
|
2021-02-01 00:15:53 +00:00
|
|
|
select BUSYBOX_CONFIG_SHELL_ASH
|
2017-08-23 21:13:34 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Choose ash to be the shell executed by 'sh' name.
|
|
|
|
The ash code will be built into busybox. If you don't select
|
|
|
|
"ash" choice (CONFIG_ASH), this shell may only be invoked by
|
|
|
|
the name 'sh' (and not 'ash').
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_SH_IS_HUSH
|
|
|
|
bool "hush"
|
2021-02-01 00:15:53 +00:00
|
|
|
select BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Choose hush to be the shell executed by 'sh' name.
|
|
|
|
The hush code will be built into busybox. If you don't select
|
|
|
|
"hush" choice (CONFIG_HUSH), this shell may only be invoked by
|
|
|
|
the name 'sh' (and not 'hush').
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_SH_IS_NONE
|
|
|
|
bool "none"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Choose which shell is aliased to 'bash' name"
|
|
|
|
default BUSYBOX_CONFIG_BASH_IS_NONE
|
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Choose which shell you want to be executed by 'bash' alias.
|
|
|
|
The ash shell is the most bash compatible and full featured one,
|
|
|
|
although compatibility is far from being complete.
|
2017-01-15 01:21:41 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
Note that selecting this option does not switch on any bash
|
|
|
|
compatibility code. It merely makes it possible to install
|
|
|
|
/bin/bash (sym)link and run scripts which start with
|
|
|
|
#!/bin/bash line.
|
2017-01-15 01:21:41 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
Many systems use it in scripts which use bash-specific features,
|
|
|
|
even simple ones like $RANDOM. Without this option, busybox
|
|
|
|
can't be used for running them because it won't recongnize
|
|
|
|
"bash" as a supported applet name.
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_BASH_IS_ASH
|
|
|
|
depends on !BUSYBOX_CONFIG_NOMMU
|
|
|
|
bool "ash"
|
2021-02-01 00:15:53 +00:00
|
|
|
select BUSYBOX_CONFIG_SHELL_ASH
|
2017-08-23 21:13:34 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Choose ash to be the shell executed by 'bash' name.
|
|
|
|
The ash code will be built into busybox. If you don't select
|
|
|
|
"ash" choice (CONFIG_ASH), this shell may only be invoked by
|
|
|
|
the name 'bash' (and not 'ash').
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_BASH_IS_HUSH
|
|
|
|
bool "hush"
|
2021-02-01 00:15:53 +00:00
|
|
|
select BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Choose hush to be the shell executed by 'bash' name.
|
|
|
|
The hush code will be built into busybox. If you don't select
|
|
|
|
"hush" choice (CONFIG_HUSH), this shell may only be invoked by
|
|
|
|
the name 'bash' (and not 'hush').
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_BASH_IS_NONE
|
|
|
|
bool "none"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
|
2021-02-01 00:15:53 +00:00
|
|
|
config BUSYBOX_CONFIG_SHELL_ASH
|
|
|
|
bool #hidden option
|
|
|
|
depends on !BUSYBOX_CONFIG_NOMMU
|
|
|
|
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH
|
2019-02-27 03:23:45 +00:00
|
|
|
bool "ash (78 kb)"
|
2014-01-31 13:50:16 +00:00
|
|
|
default BUSYBOX_DEFAULT_ASH
|
|
|
|
depends on !BUSYBOX_CONFIG_NOMMU
|
2021-02-01 00:15:53 +00:00
|
|
|
select BUSYBOX_CONFIG_SHELL_ASH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:23:45 +00:00
|
|
|
The most complete and most pedantically correct shell included with
|
2019-02-27 03:22:35 +00:00
|
|
|
busybox. This shell is actually a derivative of the Debian 'dash'
|
|
|
|
shell (by Herbert Xu), which was created by porting the 'ash' shell
|
|
|
|
(written by Kenneth Almquist) from NetBSD.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
# ash options
|
|
|
|
# note: Don't remove !NOMMU part in the next line; it would break
|
|
|
|
# menuconfig's indenting.
|
2021-02-01 00:15:53 +00:00
|
|
|
if !NOMMU && (BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH)
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2017-01-15 01:21:41 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
|
|
|
|
bool "Optimize for size instead of speed"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB
|
|
|
|
bool "Use internal glob() implementation"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB # Y is bigger, but because of uclibc glob() bug, let Y be default for now
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2017-01-15 01:21:41 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Do not use glob() function from libc, use internal implementation.
|
|
|
|
Use this if you are getting "glob.h: No such file or directory"
|
|
|
|
or similar build errors.
|
|
|
|
Note that as of now (2017-01), uclibc and musl glob() both have bugs
|
|
|
|
which would break ash if you select N here.
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_ASH_BASH_COMPAT
|
|
|
|
bool "bash-compatible extensions"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_BASH_COMPAT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2019-02-27 03:23:45 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_BASH_SOURCE_CURDIR
|
|
|
|
bool "'source' and '.' builtins search current directory after $PATH"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_BASH_SOURCE_CURDIR # do not encourage non-standard behavior
|
|
|
|
depends on BUSYBOX_CONFIG_ASH_BASH_COMPAT
|
|
|
|
help
|
|
|
|
This is not compliant with standards. Avoid if possible.
|
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_ASH_BASH_NOT_FOUND_HOOK
|
|
|
|
bool "command_not_found_handle hook support"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_BASH_NOT_FOUND_HOOK
|
|
|
|
depends on BUSYBOX_CONFIG_ASH_BASH_COMPAT
|
|
|
|
help
|
|
|
|
Enable support for the 'command_not_found_handle' hook function,
|
|
|
|
from GNU bash, which allows for alternative command not found
|
|
|
|
handling.
|
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_JOB_CONTROL
|
|
|
|
bool "Job control"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_JOB_CONTROL
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_ASH_ALIAS
|
|
|
|
bool "Alias support"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_ALIAS
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
|
|
|
|
bool "Pseudorandom generator and $RANDOM variable"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2017-01-15 01:21:41 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable pseudorandom generator and dynamic variable "$RANDOM".
|
|
|
|
Each read of "$RANDOM" will generate a new pseudorandom value.
|
|
|
|
You can reset the generator by using a specified start value.
|
|
|
|
After "unset RANDOM" the generator will switch off and this
|
|
|
|
variable will no longer have special treatment.
|
2017-01-15 01:21:41 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
|
|
|
|
bool "Expand prompt string"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2017-01-15 01:21:41 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
$PS# may contain volatile content, such as backquote commands.
|
|
|
|
This option recreates the prompt string from the environment
|
|
|
|
variable each time it is displayed.
|
2017-01-15 01:21:41 +00:00
|
|
|
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT
|
2017-08-23 21:13:34 +00:00
|
|
|
bool "Idle timeout variable $TMOUT"
|
2014-01-31 13:50:16 +00:00
|
|
|
default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable bash-like auto-logout after $TMOUT seconds of idle time.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_MAIL
|
|
|
|
bool "Check for new mail in interactive shell"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_MAIL
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable "check for new mail" function:
|
|
|
|
if set, $MAIL file and $MAILPATH list of files
|
|
|
|
are checked for mtime changes, and "you have mail"
|
|
|
|
message is printed if change is detected.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_ECHO
|
|
|
|
bool "echo builtin"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_ECHO
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_PRINTF
|
|
|
|
bool "printf builtin"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_PRINTF
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_TEST
|
|
|
|
bool "test builtin"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_TEST
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2023-01-03 21:48:51 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_SLEEP
|
|
|
|
bool "sleep builtin"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_SLEEP
|
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
|
|
|
|
2015-04-04 17:52:02 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_HELP
|
|
|
|
bool "help builtin"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_HELP
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_ASH_GETOPTS
|
|
|
|
bool "getopts builtin"
|
|
|
|
default BUSYBOX_DEFAULT_ASH_GETOPTS
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2015-04-04 17:52:02 +00:00
|
|
|
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_ASH_CMDCMD
|
2017-08-23 21:13:34 +00:00
|
|
|
bool "command builtin"
|
2014-01-31 13:50:16 +00:00
|
|
|
default BUSYBOX_DEFAULT_ASH_CMDCMD
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable support for the 'command' builtin, which allows
|
|
|
|
you to run the specified command or builtin,
|
|
|
|
even when there is a function with the same name.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
endif # ash options
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_CTTYHACK
|
2019-02-27 03:23:45 +00:00
|
|
|
bool "cttyhack (2.4 kb)"
|
2014-01-31 13:50:16 +00:00
|
|
|
default BUSYBOX_DEFAULT_CTTYHACK
|
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
One common problem reported on the mailing list is the "can't
|
|
|
|
access tty; job control turned off" error message, which typically
|
|
|
|
appears when one tries to use a shell with stdin/stdout on
|
|
|
|
/dev/console.
|
|
|
|
This device is special - it cannot be a controlling tty.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
The proper solution is to use the correct device instead of
|
|
|
|
/dev/console.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
cttyhack provides a "quick and dirty" solution to this problem.
|
|
|
|
It analyzes stdin with various ioctls, trying to determine whether
|
|
|
|
it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
|
|
|
|
On Linux it also checks sysfs for a pointer to the active console.
|
|
|
|
If cttyhack is able to find the real console device, it closes
|
|
|
|
stdin/out/err and reopens that device.
|
|
|
|
Then it executes the given program. Opening the device will make
|
|
|
|
that device a controlling tty. This may require cttyhack
|
|
|
|
to be a session leader.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
Example for /etc/inittab (for busybox init):
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
::respawn:/bin/cttyhack /bin/sh
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
Starting an interactive shell from boot shell script:
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
setsid cttyhack sh
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
Giving controlling tty to shell running with PID 1:
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
# exec cttyhack sh
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
Without cttyhack, you need to know exact tty name,
|
|
|
|
and do something like this:
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
# exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
Starting getty on a controlling tty from a shell script:
|
2014-05-25 17:42:09 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
# getty 115200 $(cttyhack)
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH
|
2019-02-27 03:23:45 +00:00
|
|
|
bool "hush (68 kb)"
|
2014-01-31 13:50:16 +00:00
|
|
|
default BUSYBOX_DEFAULT_HUSH
|
2021-02-01 00:15:53 +00:00
|
|
|
select BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:23:45 +00:00
|
|
|
hush is a small shell. It handles the normal flow control
|
2019-02-27 03:22:35 +00:00
|
|
|
constructs such as if/then/elif/else/fi, for/in/do/done, while loops,
|
|
|
|
case/esac. Redirections, here documents, $((arithmetic))
|
|
|
|
and functions are supported.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
It will compile and work on no-mmu systems.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
It does not handle select, aliases, tilde expansion,
|
|
|
|
&>file and >&file redirection of stdout+stderr.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2021-02-01 00:15:53 +00:00
|
|
|
config BUSYBOX_CONFIG_SHELL_HUSH
|
|
|
|
bool "Internal shell for embedded script support"
|
|
|
|
default BUSYBOX_DEFAULT_SHELL_HUSH
|
|
|
|
|
|
|
|
# hush options
|
|
|
|
# It's only needed to get "nice" menuconfig indenting.
|
|
|
|
if SHELL_HUSH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH
|
|
|
|
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_BASH_COMPAT
|
|
|
|
bool "bash-compatible extensions"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION
|
|
|
|
bool "Brace expansion"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_BRACE_EXPANSION
|
|
|
|
depends on BUSYBOX_CONFIG_HUSH_BASH_COMPAT
|
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable {abc,def} extension.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:23:45 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_BASH_SOURCE_CURDIR
|
|
|
|
bool "'source' and '.' builtins search current directory after $PATH"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_BASH_SOURCE_CURDIR # do not encourage non-standard behavior
|
|
|
|
depends on BUSYBOX_CONFIG_HUSH_BASH_COMPAT
|
|
|
|
help
|
|
|
|
This is not compliant with standards. Avoid if possible.
|
|
|
|
|
2021-08-31 15:12:44 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_LINENO_VAR
|
|
|
|
bool "$LINENO variable (bashism)"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_LINENO_VAR
|
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
|
|
|
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_INTERACTIVE
|
|
|
|
bool "Interactive mode"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_INTERACTIVE
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable interactive mode (prompt and command editing).
|
|
|
|
Without this, hush simply reads and executes commands
|
|
|
|
from stdin just like a shell script from a file.
|
|
|
|
No prompt, no PS1/PS2 magic shell variables.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_SAVEHISTORY
|
|
|
|
bool "Save command history to .hush_history"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_SAVEHISTORY
|
|
|
|
depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE && BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY
|
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_JOB
|
|
|
|
bool "Job control"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_JOB
|
|
|
|
depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE
|
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
|
|
|
|
command (not entire shell), fg/bg builtins work. Without this option,
|
|
|
|
"cmd &" still works by simply spawning a process and immediately
|
|
|
|
prompting for next command (or executing next command in a script),
|
|
|
|
but no separate process group is formed.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_TICK
|
2019-02-27 03:23:45 +00:00
|
|
|
bool "Support command substitution"
|
2014-01-31 13:50:16 +00:00
|
|
|
default BUSYBOX_DEFAULT_HUSH_TICK
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable `command` and $(command).
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_IF
|
|
|
|
bool "Support if/then/elif/else/fi"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_IF
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_LOOPS
|
|
|
|
bool "Support for, while and until loops"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_LOOPS
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_CASE
|
|
|
|
bool "Support case ... esac statement"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_CASE
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable case ... esac statement. +400 bytes.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_FUNCTIONS
|
|
|
|
bool "Support funcname() { commands; } syntax"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_FUNCTIONS
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable support for shell functions. +800 bytes.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_LOCAL
|
2017-08-23 21:13:34 +00:00
|
|
|
bool "local builtin"
|
2014-01-31 13:50:16 +00:00
|
|
|
default BUSYBOX_DEFAULT_HUSH_LOCAL
|
|
|
|
depends on BUSYBOX_CONFIG_HUSH_FUNCTIONS
|
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable support for local variables in functions.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
|
|
|
|
bool "Pseudorandom generator and $RANDOM variable"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable pseudorandom generator and dynamic variable "$RANDOM".
|
|
|
|
Each read of "$RANDOM" will generate a new pseudorandom value.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_MODE_X
|
|
|
|
bool "Support 'hush -x' option and 'set -x' command"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_MODE_X
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
This instructs hush to print commands before execution.
|
|
|
|
Adds ~300 bytes.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_ECHO
|
|
|
|
bool "echo builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_ECHO
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_PRINTF
|
|
|
|
bool "printf builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_PRINTF
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_TEST
|
|
|
|
bool "test builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_TEST
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_HELP
|
|
|
|
bool "help builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_HELP
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_EXPORT
|
|
|
|
bool "export builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_EXPORT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_EXPORT_N
|
|
|
|
bool "Support 'export -n' option"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_EXPORT_N
|
|
|
|
depends on BUSYBOX_CONFIG_HUSH_EXPORT
|
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
export -n unexports variables. It is a bash extension.
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2019-02-27 03:23:45 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_READONLY
|
|
|
|
bool "readonly builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_READONLY
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2019-02-27 03:23:45 +00:00
|
|
|
help
|
|
|
|
Enable support for read-only variables.
|
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_KILL
|
|
|
|
bool "kill builtin (supports kill %jobspec)"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_KILL
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_WAIT
|
|
|
|
bool "wait builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_WAIT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2019-02-27 03:23:45 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_COMMAND
|
|
|
|
bool "command builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_COMMAND
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2019-02-27 03:23:45 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_TRAP
|
|
|
|
bool "trap builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_TRAP
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_TYPE
|
|
|
|
bool "type builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_TYPE
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2019-02-27 03:23:45 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_TIMES
|
|
|
|
bool "times builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_TIMES
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2019-02-27 03:23:45 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_READ
|
|
|
|
bool "read builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_READ
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_SET
|
|
|
|
bool "set builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_SET
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_UNSET
|
|
|
|
bool "unset builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_UNSET
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_ULIMIT
|
|
|
|
bool "ulimit builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_ULIMIT
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_HUSH_UMASK
|
|
|
|
bool "umask builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_UMASK
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2019-02-27 03:23:45 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_GETOPTS
|
|
|
|
bool "getopts builtin"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_GETOPTS
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
2019-02-27 03:23:45 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
config BUSYBOX_CONFIG_HUSH_MEMLEAK
|
|
|
|
bool "memleak builtin (debugging)"
|
|
|
|
default BUSYBOX_DEFAULT_HUSH_MEMLEAK
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_HUSH
|
|
|
|
|
|
|
|
endif # hush options
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
comment "Options common to all shells"
|
2021-02-01 00:15:53 +00:00
|
|
|
if BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2017-01-15 01:21:41 +00:00
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_MATH
|
2014-01-31 13:50:16 +00:00
|
|
|
bool "POSIX math support"
|
2017-01-15 01:21:41 +00:00
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_MATH
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable math support in the shell via $((...)) syntax.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2017-01-15 01:21:41 +00:00
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_MATH_64
|
2014-01-31 13:50:16 +00:00
|
|
|
bool "Extend POSIX math support to 64 bit"
|
2017-01-15 01:21:41 +00:00
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_MATH_64
|
|
|
|
depends on BUSYBOX_CONFIG_FEATURE_SH_MATH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Enable 64-bit math support in the shell. This will make the shell
|
|
|
|
slightly larger, but will allow computation with very large numbers.
|
|
|
|
This is not in POSIX, so do not rely on this in portable code.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-06-15 09:16:55 +00:00
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_MATH_BASE
|
|
|
|
bool "Support BASE#nnnn literals"
|
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_MATH_BASE
|
|
|
|
depends on BUSYBOX_CONFIG_FEATURE_SH_MATH
|
|
|
|
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
|
|
|
|
bool "Hide message on interactive shell startup"
|
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
Remove the busybox introduction when starting a shell.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
|
|
|
|
bool "Standalone shell"
|
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
This option causes busybox shells to use busybox applets
|
|
|
|
in preference to executables in the PATH whenever possible. For
|
|
|
|
example, entering the command 'ifconfig' into the shell would cause
|
|
|
|
busybox to use the ifconfig busybox applet. Specifying the fully
|
|
|
|
qualified executable name, such as '/sbin/ifconfig' will still
|
|
|
|
execute the /sbin/ifconfig executable on the filesystem. This option
|
|
|
|
is generally used when creating a statically linked version of busybox
|
|
|
|
for use as a rescue shell, in the event that you screw up your system.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
This is implemented by re-execing /proc/self/exe (typically)
|
|
|
|
with right parameters.
|
2017-08-23 21:13:34 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
However, there are drawbacks: it is problematic in chroot jails
|
|
|
|
without mounted /proc, and ps/top may show command name as 'exe'
|
|
|
|
for applets started this way.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
|
|
|
|
bool "Run 'nofork' applets directly"
|
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
This option causes busybox shells to not execute typical
|
|
|
|
fork/exec/wait sequence, but call <applet>_main directly,
|
|
|
|
if possible. (Sometimes it is not possible: for example,
|
|
|
|
this is not possible in pipes).
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
This will be done only for some applets (those which are marked
|
|
|
|
NOFORK in include/applets.h).
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
This may significantly speed up some shell scripts.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:22:35 +00:00
|
|
|
This feature is relatively new. Use with care. Report bugs
|
|
|
|
to project mailing list.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:23:45 +00:00
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_READ_FRAC
|
|
|
|
bool "read -t N.NNN support (+110 bytes)"
|
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_READ_FRAC
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
2019-02-27 03:23:45 +00:00
|
|
|
help
|
|
|
|
Enable support for fractional second timeout in read builtin.
|
|
|
|
|
2014-01-31 13:50:16 +00:00
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE
|
|
|
|
bool "Use $HISTFILESIZE"
|
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
2014-01-31 13:50:16 +00:00
|
|
|
help
|
2019-02-27 03:22:35 +00:00
|
|
|
This option makes busybox shells to use $HISTFILESIZE variable
|
|
|
|
to set shell history size. Note that its max value is capped
|
|
|
|
by "History size" setting in library tuning section.
|
2014-01-31 13:50:16 +00:00
|
|
|
|
2019-02-27 03:23:45 +00:00
|
|
|
config BUSYBOX_CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS
|
|
|
|
bool "Embed scripts in the binary"
|
|
|
|
default BUSYBOX_DEFAULT_FEATURE_SH_EMBEDDED_SCRIPTS
|
2021-02-01 00:15:53 +00:00
|
|
|
depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH
|
2019-02-27 03:23:45 +00:00
|
|
|
help
|
|
|
|
Allow scripts to be compressed and embedded in the busybox
|
|
|
|
binary. The scripts should be placed in the 'embed' directory
|
|
|
|
at build time. Like applets, scripts can be run as
|
|
|
|
'busybox SCRIPT ...' or by linking their name to the binary.
|
|
|
|
|
|
|
|
This also allows applets to be implemented as scripts: place
|
|
|
|
the script in 'applets_sh' and a stub C file containing
|
|
|
|
configuration in the appropriate subsystem directory.
|
|
|
|
|
2017-08-23 21:13:34 +00:00
|
|
|
endif # Options common to all shells
|
2014-01-31 13:50:16 +00:00
|
|
|
|
|
|
|
endmenu
|