2002-12-05 08:41:41 +00:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
|
|
|
# see scripts/kbuild/config-language.txt.
|
|
|
|
#
|
|
|
|
|
2005-09-24 05:49:36 +00:00
|
|
|
menu "Shells"
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2010-06-08 10:15:11 +00:00
|
|
|
INSERT
|
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH
|
2002-12-05 08:41:41 +00:00
|
|
|
bool "ash"
|
2010-06-06 02:14:28 +00:00
|
|
|
default y
|
2009-11-27 01:35:15 +00:00
|
|
|
depends on !NOMMU
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2003-08-08 23:40:12 +00:00
|
|
|
Tha 'ash' shell adds about 60k in the default configuration and is
|
|
|
|
the most complete and most pedantically correct shell included with
|
2008-07-22 18:27:53 +00:00
|
|
|
busybox. This shell is actually a derivative of the Debian 'dash'
|
2003-10-22 09:58:56 +00:00
|
|
|
shell (by Herbert Xu), which was created by porting the 'ash' shell
|
2004-03-15 08:29:22 +00:00
|
|
|
(written by Kenneth Almquist) from NetBSD.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2008-03-25 01:17:40 +00:00
|
|
|
config ASH_BASH_COMPAT
|
|
|
|
bool "bash-compatible extensions"
|
|
|
|
default y
|
|
|
|
depends on ASH
|
|
|
|
help
|
2008-08-06 17:39:30 +00:00
|
|
|
Enable bash-compatible extensions.
|
2008-03-25 01:17:40 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_JOB_CONTROL
|
2006-06-08 21:48:47 +00:00
|
|
|
bool "Job control"
|
2002-12-05 08:41:41 +00:00
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2003-07-14 19:37:08 +00:00
|
|
|
Enable job control in the ash shell.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_ALIAS
|
2006-06-08 21:48:47 +00:00
|
|
|
bool "alias support"
|
2002-12-05 08:41:41 +00:00
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2003-07-14 19:37:08 +00:00
|
|
|
Enable alias support in the ash shell.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_GETOPTS
|
2006-06-08 21:37:26 +00:00
|
|
|
bool "Builtin getopt to parse positional parameters"
|
2010-06-06 02:14:28 +00:00
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2004-09-24 09:09:44 +00:00
|
|
|
Enable getopts builtin in the ash shell.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_BUILTIN_ECHO
|
2006-06-08 21:37:26 +00:00
|
|
|
bool "Builtin version of 'echo'"
|
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2006-06-08 21:37:26 +00:00
|
|
|
help
|
2007-01-29 23:56:13 +00:00
|
|
|
Enable support for echo, builtin to ash.
|
2006-06-08 21:37:26 +00:00
|
|
|
|
2008-06-01 22:36:39 +00:00
|
|
|
config ASH_BUILTIN_PRINTF
|
|
|
|
bool "Builtin version of 'printf'"
|
|
|
|
default y
|
|
|
|
depends on ASH
|
|
|
|
help
|
|
|
|
Enable support for printf, builtin to ash.
|
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_BUILTIN_TEST
|
2006-06-08 21:37:26 +00:00
|
|
|
bool "Builtin version of 'test'"
|
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2006-06-08 21:37:26 +00:00
|
|
|
help
|
2007-01-29 23:56:13 +00:00
|
|
|
Enable support for test, builtin to ash.
|
2006-06-08 21:37:26 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_CMDCMD
|
2006-06-08 21:48:47 +00:00
|
|
|
bool "'command' command to override shell builtins"
|
2010-06-06 02:14:28 +00:00
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2003-07-22 10:14:32 +00:00
|
|
|
Enable support for the ash 'command' builtin, which allows
|
|
|
|
you to run the specified command with the specified arguments,
|
|
|
|
even when there is an ash builtin command with the same name.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_MAIL
|
2006-04-13 23:22:16 +00:00
|
|
|
bool "Check for new mail on interactive shells"
|
2010-06-06 02:14:28 +00:00
|
|
|
default n
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2003-07-14 19:37:08 +00:00
|
|
|
Enable "check for new mail" in the ash shell.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_OPTIMIZE_FOR_SIZE
|
2006-04-13 23:22:16 +00:00
|
|
|
bool "Optimize for size instead of speed"
|
2002-12-05 08:41:41 +00:00
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2006-02-08 18:34:21 +00:00
|
|
|
Compile ash for reduced size at the price of speed.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_RANDOM_SUPPORT
|
2009-04-05 09:02:11 +00:00
|
|
|
bool "Pseudorandom generator and $RANDOM variable"
|
2010-06-06 02:14:28 +00:00
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2004-03-16 05:14:10 +00:00
|
|
|
help
|
|
|
|
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.
|
2009-04-05 09:02:11 +00:00
|
|
|
After "unset RANDOM" the generator will switch off and this
|
2004-03-16 05:14:10 +00:00
|
|
|
variable will no longer have special treatment.
|
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config ASH_EXPAND_PRMT
|
2006-04-13 23:22:16 +00:00
|
|
|
bool "Expand prompt string"
|
2010-06-06 02:14:28 +00:00
|
|
|
default y
|
2006-10-05 10:17:08 +00:00
|
|
|
depends on ASH
|
2005-09-05 13:25:11 +00:00
|
|
|
help
|
2009-04-05 09:02:11 +00:00
|
|
|
"PS#" may contain volatile content, such as backquote commands.
|
2006-02-08 18:34:21 +00:00
|
|
|
This option recreates the prompt string from the environment
|
|
|
|
variable each time it is displayed.
|
2005-09-05 13:25:11 +00:00
|
|
|
|
2010-06-06 20:14:58 +00:00
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Choose which shell is aliased to 'sh' name"
|
|
|
|
default FEATURE_SH_IS_ASH
|
|
|
|
help
|
|
|
|
Choose which shell you want to be executed by 'sh' alias.
|
|
|
|
The ash shell is the most bash compatible and full featured one.
|
|
|
|
|
2010-06-07 11:34:34 +00:00
|
|
|
# note: cannot use "select ASH" here, it breaks "make allnoconfig"
|
2010-06-06 20:14:58 +00:00
|
|
|
config FEATURE_SH_IS_ASH
|
|
|
|
depends on ASH
|
|
|
|
bool "ash"
|
|
|
|
depends on !NOMMU
|
|
|
|
|
|
|
|
config FEATURE_SH_IS_HUSH
|
|
|
|
depends on HUSH
|
|
|
|
bool "hush"
|
|
|
|
|
|
|
|
config FEATURE_SH_IS_NONE
|
|
|
|
bool "none"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Choose which shell is aliased to 'bash' name"
|
|
|
|
default FEATURE_BASH_IS_NONE
|
|
|
|
help
|
|
|
|
Choose which shell you want to be executed by 'bash' alias.
|
|
|
|
The ash shell is the most bash compatible and full featured one.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
config FEATURE_BASH_IS_ASH
|
|
|
|
depends on ASH
|
|
|
|
bool "ash"
|
|
|
|
depends on !NOMMU
|
|
|
|
|
|
|
|
config FEATURE_BASH_IS_HUSH
|
|
|
|
depends on HUSH
|
|
|
|
bool "hush"
|
|
|
|
|
|
|
|
config FEATURE_BASH_IS_NONE
|
|
|
|
bool "none"
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config LASH
|
2009-03-28 12:12:58 +00:00
|
|
|
bool "lash (deprecated: aliased to hush)"
|
2002-12-05 08:41:41 +00:00
|
|
|
default n
|
2007-11-23 23:28:55 +00:00
|
|
|
select HUSH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2007-11-23 23:28:55 +00:00
|
|
|
lash is deprecated and will be removed, please migrate to hush.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config MSH
|
2009-03-29 00:52:41 +00:00
|
|
|
bool "msh (deprecated: please use hush)"
|
2002-12-05 08:41:41 +00:00
|
|
|
default n
|
2009-08-20 22:05:51 +00:00
|
|
|
select HUSH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2009-03-29 00:52:41 +00:00
|
|
|
msh is deprecated and will be removed, please migrate to hush.
|
|
|
|
If there is a feature msh has but hush does not, please let us know.
|
|
|
|
|
2009-04-13 14:23:12 +00:00
|
|
|
# The minix shell (adds just 30k) is quite complete and handles things
|
|
|
|
# like for/do/done, case/esac and all the things you expect a Bourne
|
|
|
|
# shell to do. It is not always pedantically correct about Bourne
|
|
|
|
# shell grammar (try running the shell testscript "tests/sh.testcases"
|
|
|
|
# on it and compare vs bash) but for most things it works quite well.
|
|
|
|
# It uses only vfork, so it can be used on uClinux systems.
|
|
|
|
|
|
|
|
|
2009-04-02 10:02:37 +00:00
|
|
|
config SH_MATH_SUPPORT
|
|
|
|
bool "POSIX math support"
|
|
|
|
default y
|
|
|
|
depends on ASH || HUSH
|
|
|
|
help
|
|
|
|
Enable math support in the shell via $((...)) syntax.
|
|
|
|
|
|
|
|
config SH_MATH_SUPPORT_64
|
|
|
|
bool "Extend POSIX math support to 64 bit"
|
2010-06-06 02:14:28 +00:00
|
|
|
default y
|
2009-04-02 10:02:37 +00:00
|
|
|
depends on SH_MATH_SUPPORT
|
|
|
|
help
|
|
|
|
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.
|
|
|
|
|
2006-10-05 10:17:08 +00:00
|
|
|
config FEATURE_SH_EXTRA_QUIET
|
2004-01-03 12:07:32 +00:00
|
|
|
bool "Hide message on interactive shell startup"
|
2010-06-06 02:14:28 +00:00
|
|
|
default y
|
|
|
|
depends on HUSH || ASH
|
2002-12-05 08:41:41 +00:00
|
|
|
help
|
2004-01-03 12:07:32 +00:00
|
|
|
Remove the busybox introduction when starting a shell.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2007-04-10 23:03:30 +00:00
|
|
|
config FEATURE_SH_STANDALONE
|
2004-01-03 12:07:32 +00:00
|
|
|
bool "Standalone shell"
|
2002-12-09 11:10:40 +00:00
|
|
|
default n
|
2010-06-06 02:14:28 +00:00
|
|
|
depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS
|
2002-12-09 11:10:40 +00:00
|
|
|
help
|
2007-05-08 17:27:17 +00:00
|
|
|
This option causes busybox shells to use busybox applets
|
2008-07-22 18:27:53 +00:00
|
|
|
in preference to executables in the PATH whenever possible. For
|
2004-04-07 09:34:27 +00:00
|
|
|
example, entering the command 'ifconfig' into the shell would cause
|
2008-07-22 18:27:53 +00:00
|
|
|
busybox to use the ifconfig busybox applet. Specifying the fully
|
2004-04-07 09:34:27 +00:00
|
|
|
qualified executable name, such as '/sbin/ifconfig' will still
|
2008-07-22 18:27:53 +00:00
|
|
|
execute the /sbin/ifconfig executable on the filesystem. This option
|
2006-03-03 19:02:50 +00:00
|
|
|
is generally used when creating a statically linked version of busybox
|
2004-04-07 09:34:27 +00:00
|
|
|
for use as a rescue shell, in the event that you screw up your system.
|
2002-12-05 08:41:41 +00:00
|
|
|
|
2007-05-08 17:27:17 +00:00
|
|
|
This is implemented by re-execing /proc/self/exe (typically)
|
|
|
|
with right parameters. Some selected applets ("NOFORK" applets)
|
|
|
|
can even be executed without creating new process.
|
|
|
|
Instead, busybox will call <applet>_main() internally.
|
|
|
|
|
|
|
|
However, this causes problems in chroot jails without mounted /proc
|
|
|
|
and with ps/top (command name can be shown as 'exe' for applets
|
|
|
|
started this way).
|
|
|
|
# untrue?
|
|
|
|
# Note that this will *also* cause applets to take precedence
|
2008-07-22 18:27:53 +00:00
|
|
|
# over shell builtins of the same name. So turning this on will
|
2007-05-08 17:27:17 +00:00
|
|
|
# eliminate any performance gained by turning on the builtin "echo"
|
|
|
|
# and "test" commands in ash.
|
|
|
|
# untrue?
|
|
|
|
# Note that when using this option, the shell will attempt to directly
|
2008-07-22 18:27:53 +00:00
|
|
|
# run '/bin/busybox'. If you do not have the busybox binary sitting in
|
2007-05-08 17:27:17 +00:00
|
|
|
# that exact location with that exact name, this option will not work at
|
|
|
|
# all.
|
2004-09-24 01:25:39 +00:00
|
|
|
|
2008-04-12 20:07:53 +00:00
|
|
|
config FEATURE_SH_NOFORK
|
|
|
|
bool "Run 'nofork' applets directly"
|
|
|
|
default n
|
2010-06-06 02:14:28 +00:00
|
|
|
depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS
|
2008-04-12 20:07:53 +00:00
|
|
|
help
|
|
|
|
This option causes busybox shells [currently only ash]
|
|
|
|
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).
|
|
|
|
|
|
|
|
This will be done only for some applets (those which are marked
|
|
|
|
NOFORK in include/applets.h).
|
|
|
|
|
|
|
|
This may significantly speed up some shell scripts.
|
|
|
|
|
|
|
|
This feature is relatively new. Use with care.
|
|
|
|
|
2007-05-18 09:45:36 +00:00
|
|
|
config CTTYHACK
|
|
|
|
bool "cttyhack"
|
2010-06-06 02:14:28 +00:00
|
|
|
default y
|
2007-05-18 09:45:36 +00:00
|
|
|
help
|
|
|
|
One common problem reported on the mailing list is "can't access tty;
|
|
|
|
job control turned off" error message which typically appears when
|
|
|
|
one tries to use shell with stdin/stdout opened to /dev/console.
|
|
|
|
This device is special - it cannot be a controlling tty.
|
|
|
|
|
|
|
|
Proper solution is to use correct device instead of /dev/console.
|
|
|
|
|
|
|
|
cttyhack provides "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).
|
|
|
|
If it detects one, it closes stdin/out/err and reopens that device.
|
2010-05-15 18:43:07 +00:00
|
|
|
Then it executes given program. Opening the device will make
|
|
|
|
that device a controlling tty. This may require cttyhack
|
|
|
|
to be a session leader.
|
|
|
|
|
|
|
|
Example for /etc/inittab (for busybox init):
|
2007-05-18 09:45:36 +00:00
|
|
|
|
|
|
|
::respawn:/bin/cttyhack /bin/sh
|
|
|
|
|
2010-05-15 18:43:07 +00:00
|
|
|
Giving controlling tty to shell running with PID 1:
|
|
|
|
|
|
|
|
$ exec cttyhack sh
|
|
|
|
|
2010-05-17 07:55:13 +00:00
|
|
|
Starting an interactive shell from boot shell script:
|
2010-05-15 18:43:07 +00:00
|
|
|
|
|
|
|
setsid cttyhack sh
|
|
|
|
|
2002-12-05 08:41:41 +00:00
|
|
|
endmenu
|