2 # For a description of the syntax of this configuration file,
3 # see scripts/kbuild/config-language.txt.
12 prompt "Choose which shell is aliased to 'sh' name"
13 default FEATURE_SH_IS_ASH
15 Choose which shell you want to be executed by 'sh' alias.
16 The ash shell is the most bash compatible and full featured one.
18 # note: cannot use "select ASH" here, it breaks "make allnoconfig"
19 config FEATURE_SH_IS_ASH
24 config FEATURE_SH_IS_HUSH
28 config FEATURE_SH_IS_NONE
34 prompt "Choose which shell is aliased to 'bash' name"
35 default FEATURE_BASH_IS_NONE
37 Choose which shell you want to be executed by 'bash' alias.
38 The ash shell is the most bash compatible and full featured one.
40 Note that selecting this option does not switch on any bash
41 compatibility code. It merely makes it possible to install
42 /bin/bash (sym)link and run scripts which start with
45 Many systems use it in scripts which use bash-specific features,
46 even simple ones like $RANDOM. Without this option, busybox
47 can't be used for running them because it won't recongnize
48 "bash" as a supported applet name.
50 config FEATURE_BASH_IS_ASH
55 config FEATURE_BASH_IS_HUSH
59 config FEATURE_BASH_IS_NONE
66 bool "lash (deprecated: aliased to hush)"
70 lash is deprecated and will be removed, please migrate to hush.
73 bool "msh (deprecated: please use hush)"
77 msh is deprecated and will be removed, please migrate to hush.
78 If there is a feature msh has but hush does not, please let us know.
80 # The minix shell (adds just 30k) is quite complete and handles things
81 # like for/do/done, case/esac and all the things you expect a Bourne
82 # shell to do. It is not always pedantically correct about Bourne
83 # shell grammar (try running the shell testscript "tests/sh.testcases"
84 # on it and compare vs bash) but for most things it works quite well.
85 # It uses only vfork, so it can be used on uClinux systems.
88 config SH_MATH_SUPPORT
89 bool "POSIX math support"
91 depends on ASH || HUSH
93 Enable math support in the shell via $((...)) syntax.
95 config SH_MATH_SUPPORT_64
96 bool "Extend POSIX math support to 64 bit"
98 depends on SH_MATH_SUPPORT
100 Enable 64-bit math support in the shell. This will make the shell
101 slightly larger, but will allow computation with very large numbers.
102 This is not in POSIX, so do not rely on this in portable code.
104 config FEATURE_SH_EXTRA_QUIET
105 bool "Hide message on interactive shell startup"
107 depends on HUSH || ASH
109 Remove the busybox introduction when starting a shell.
111 config FEATURE_SH_STANDALONE
112 bool "Standalone shell"
114 depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS
116 This option causes busybox shells to use busybox applets
117 in preference to executables in the PATH whenever possible. For
118 example, entering the command 'ifconfig' into the shell would cause
119 busybox to use the ifconfig busybox applet. Specifying the fully
120 qualified executable name, such as '/sbin/ifconfig' will still
121 execute the /sbin/ifconfig executable on the filesystem. This option
122 is generally used when creating a statically linked version of busybox
123 for use as a rescue shell, in the event that you screw up your system.
125 This is implemented by re-execing /proc/self/exe (typically)
126 with right parameters. Some selected applets ("NOFORK" applets)
127 can even be executed without creating new process.
128 Instead, busybox will call <applet>_main() internally.
130 However, this causes problems in chroot jails without mounted /proc
131 and with ps/top (command name can be shown as 'exe' for applets
134 # Note that this will *also* cause applets to take precedence
135 # over shell builtins of the same name. So turning this on will
136 # eliminate any performance gained by turning on the builtin "echo"
137 # and "test" commands in ash.
139 # Note that when using this option, the shell will attempt to directly
140 # run '/bin/busybox'. If you do not have the busybox binary sitting in
141 # that exact location with that exact name, this option will not work at
144 config FEATURE_SH_NOFORK
145 bool "Run 'nofork' applets directly"
147 depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS
149 This option causes busybox shells [currently only ash]
150 to not execute typical fork/exec/wait sequence, but call <applet>_main
151 directly, if possible. (Sometimes it is not possible: for example,
152 this is not possible in pipes).
154 This will be done only for some applets (those which are marked
155 NOFORK in include/applets.h).
157 This may significantly speed up some shell scripts.
159 This feature is relatively new. Use with care.
165 One common problem reported on the mailing list is "can't access tty;
166 job control turned off" error message which typically appears when
167 one tries to use shell with stdin/stdout opened to /dev/console.
168 This device is special - it cannot be a controlling tty.
170 Proper solution is to use correct device instead of /dev/console.
172 cttyhack provides "quick and dirty" solution to this problem.
173 It analyzes stdin with various ioctls, trying to determine whether
174 it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
175 If it detects one, it closes stdin/out/err and reopens that device.
176 Then it executes given program. Opening the device will make
177 that device a controlling tty. This may require cttyhack
178 to be a session leader.
180 Example for /etc/inittab (for busybox init):
182 ::respawn:/bin/cttyhack /bin/sh
184 Starting an interactive shell from boot shell script:
188 Giving controlling tty to shell running with PID 1:
192 Without cttyhack, you need to know exact tty name,
193 and do something like this:
195 # exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'