1# DO NOT EDIT. This file is generated from Config.src 2# 3# For a description of the syntax of this configuration file, 4# see scripts/kbuild/config-language.txt. 5# 6 7menu "Shells" 8 9config BUSYBOX_CONFIG_ASH 10 bool "ash" 11 default BUSYBOX_DEFAULT_ASH 12 depends on !BUSYBOX_CONFIG_NOMMU 13 help 14 Tha 'ash' shell adds about 60k in the default configuration and is 15 the most complete and most pedantically correct shell included with 16 busybox. This shell is actually a derivative of the Debian 'dash' 17 shell (by Herbert Xu), which was created by porting the 'ash' shell 18 (written by Kenneth Almquist) from NetBSD. 19 20config BUSYBOX_CONFIG_ASH_BASH_COMPAT 21 bool "bash-compatible extensions" 22 default BUSYBOX_DEFAULT_ASH_BASH_COMPAT 23 depends on BUSYBOX_CONFIG_ASH 24 help 25 Enable bash-compatible extensions. 26 27config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT 28 bool "Idle timeout variable" 29 default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT 30 depends on BUSYBOX_CONFIG_ASH 31 help 32 Enables bash-like auto-logout after $TMOUT seconds of idle time. 33 34config BUSYBOX_CONFIG_ASH_JOB_CONTROL 35 bool "Job control" 36 default BUSYBOX_DEFAULT_ASH_JOB_CONTROL 37 depends on BUSYBOX_CONFIG_ASH 38 help 39 Enable job control in the ash shell. 40 41config BUSYBOX_CONFIG_ASH_ALIAS 42 bool "Alias support" 43 default BUSYBOX_DEFAULT_ASH_ALIAS 44 depends on BUSYBOX_CONFIG_ASH 45 help 46 Enable alias support in the ash shell. 47 48config BUSYBOX_CONFIG_ASH_GETOPTS 49 bool "Builtin getopt to parse positional parameters" 50 default BUSYBOX_DEFAULT_ASH_GETOPTS 51 depends on BUSYBOX_CONFIG_ASH 52 help 53 Enable support for getopts builtin in ash. 54 55config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO 56 bool "Builtin version of 'echo'" 57 default BUSYBOX_DEFAULT_ASH_BUILTIN_ECHO 58 depends on BUSYBOX_CONFIG_ASH 59 help 60 Enable support for echo builtin in ash. 61 62config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF 63 bool "Builtin version of 'printf'" 64 default BUSYBOX_DEFAULT_ASH_BUILTIN_PRINTF 65 depends on BUSYBOX_CONFIG_ASH 66 help 67 Enable support for printf builtin in ash. 68 69config BUSYBOX_CONFIG_ASH_BUILTIN_TEST 70 bool "Builtin version of 'test'" 71 default BUSYBOX_DEFAULT_ASH_BUILTIN_TEST 72 depends on BUSYBOX_CONFIG_ASH 73 help 74 Enable support for test builtin in ash. 75 76config BUSYBOX_CONFIG_ASH_HELP 77 bool "help builtin" 78 default BUSYBOX_DEFAULT_ASH_HELP 79 depends on BUSYBOX_CONFIG_ASH 80 help 81 Enable help builtin in ash. 82 83config BUSYBOX_CONFIG_ASH_CMDCMD 84 bool "'command' command to override shell builtins" 85 default BUSYBOX_DEFAULT_ASH_CMDCMD 86 depends on BUSYBOX_CONFIG_ASH 87 help 88 Enable support for the ash 'command' builtin, which allows 89 you to run the specified command with the specified arguments, 90 even when there is an ash builtin command with the same name. 91 92config BUSYBOX_CONFIG_ASH_MAIL 93 bool "Check for new mail on interactive shells" 94 default BUSYBOX_DEFAULT_ASH_MAIL 95 depends on BUSYBOX_CONFIG_ASH 96 help 97 Enable "check for new mail" function in the ash shell. 98 99config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE 100 bool "Optimize for size instead of speed" 101 default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE 102 depends on BUSYBOX_CONFIG_ASH 103 help 104 Compile ash for reduced size at the price of speed. 105 106config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT 107 bool "Pseudorandom generator and $RANDOM variable" 108 default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT 109 depends on BUSYBOX_CONFIG_ASH 110 help 111 Enable pseudorandom generator and dynamic variable "$RANDOM". 112 Each read of "$RANDOM" will generate a new pseudorandom value. 113 You can reset the generator by using a specified start value. 114 After "unset RANDOM" the generator will switch off and this 115 variable will no longer have special treatment. 116 117config BUSYBOX_CONFIG_ASH_EXPAND_PRMT 118 bool "Expand prompt string" 119 default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT 120 depends on BUSYBOX_CONFIG_ASH 121 help 122 "PS#" may contain volatile content, such as backquote commands. 123 This option recreates the prompt string from the environment 124 variable each time it is displayed. 125 126config BUSYBOX_CONFIG_CTTYHACK 127 bool "cttyhack" 128 default BUSYBOX_DEFAULT_CTTYHACK 129 help 130 One common problem reported on the mailing list is the "can't 131 access tty; job control turned off" error message, which typically 132 appears when one tries to use a shell with stdin/stdout on 133 /dev/console. 134 This device is special - it cannot be a controlling tty. 135 136 The proper solution is to use the correct device instead of 137 /dev/console. 138 139 cttyhack provides a "quick and dirty" solution to this problem. 140 It analyzes stdin with various ioctls, trying to determine whether 141 it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line). 142 On Linux it also checks sysfs for a pointer to the active console. 143 If cttyhack is able to find the real console device, it closes 144 stdin/out/err and reopens that device. 145 Then it executes the given program. Opening the device will make 146 that device a controlling tty. This may require cttyhack 147 to be a session leader. 148 149 Example for /etc/inittab (for busybox init): 150 151 ::respawn:/bin/cttyhack /bin/sh 152 153 Starting an interactive shell from boot shell script: 154 155 setsid cttyhack sh 156 157 Giving controlling tty to shell running with PID 1: 158 159 # exec cttyhack sh 160 161 Without cttyhack, you need to know exact tty name, 162 and do something like this: 163 164 # exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1' 165 166 Starting getty on a controlling tty from a shell script: 167 168 # getty 115200 $(cttyhack) 169config BUSYBOX_CONFIG_HUSH 170 bool "hush" 171 default BUSYBOX_DEFAULT_HUSH 172 help 173 hush is a small shell (25k). It handles the normal flow control 174 constructs such as if/then/elif/else/fi, for/in/do/done, while loops, 175 case/esac. Redirections, here documents, $((arithmetic)) 176 and functions are supported. 177 178 It will compile and work on no-mmu systems. 179 180 It does not handle select, aliases, tilde expansion, 181 &>file and >&file redirection of stdout+stderr. 182 183config BUSYBOX_CONFIG_HUSH_BASH_COMPAT 184 bool "bash-compatible extensions" 185 default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT 186 depends on BUSYBOX_CONFIG_HUSH 187 help 188 Enable bash-compatible extensions. 189 190config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION 191 bool "Brace expansion" 192 default BUSYBOX_DEFAULT_HUSH_BRACE_EXPANSION 193 depends on BUSYBOX_CONFIG_HUSH_BASH_COMPAT 194 help 195 Enable {abc,def} extension. 196 197config BUSYBOX_CONFIG_HUSH_HELP 198 bool "help builtin" 199 default BUSYBOX_DEFAULT_HUSH_HELP 200 depends on BUSYBOX_CONFIG_HUSH 201 help 202 Enable help builtin in hush. Code size + ~1 kbyte. 203 204config BUSYBOX_CONFIG_HUSH_INTERACTIVE 205 bool "Interactive mode" 206 default BUSYBOX_DEFAULT_HUSH_INTERACTIVE 207 depends on BUSYBOX_CONFIG_HUSH 208 help 209 Enable interactive mode (prompt and command editing). 210 Without this, hush simply reads and executes commands 211 from stdin just like a shell script from a file. 212 No prompt, no PS1/PS2 magic shell variables. 213 214config BUSYBOX_CONFIG_HUSH_SAVEHISTORY 215 bool "Save command history to .hush_history" 216 default BUSYBOX_DEFAULT_HUSH_SAVEHISTORY 217 depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE && BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY 218 help 219 Enable history saving in hush. 220 221config BUSYBOX_CONFIG_HUSH_JOB 222 bool "Job control" 223 default BUSYBOX_DEFAULT_HUSH_JOB 224 depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE 225 help 226 Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current 227 command (not entire shell), fg/bg builtins work. Without this option, 228 "cmd &" still works by simply spawning a process and immediately 229 prompting for next command (or executing next command in a script), 230 but no separate process group is formed. 231 232config BUSYBOX_CONFIG_HUSH_TICK 233 bool "Process substitution" 234 default BUSYBOX_DEFAULT_HUSH_TICK 235 depends on BUSYBOX_CONFIG_HUSH 236 help 237 Enable process substitution `command` and $(command) in hush. 238 239config BUSYBOX_CONFIG_HUSH_IF 240 bool "Support if/then/elif/else/fi" 241 default BUSYBOX_DEFAULT_HUSH_IF 242 depends on BUSYBOX_CONFIG_HUSH 243 help 244 Enable if/then/elif/else/fi in hush. 245 246config BUSYBOX_CONFIG_HUSH_LOOPS 247 bool "Support for, while and until loops" 248 default BUSYBOX_DEFAULT_HUSH_LOOPS 249 depends on BUSYBOX_CONFIG_HUSH 250 help 251 Enable for, while and until loops in hush. 252 253config BUSYBOX_CONFIG_HUSH_CASE 254 bool "Support case ... esac statement" 255 default BUSYBOX_DEFAULT_HUSH_CASE 256 depends on BUSYBOX_CONFIG_HUSH 257 help 258 Enable case ... esac statement in hush. +400 bytes. 259 260config BUSYBOX_CONFIG_HUSH_FUNCTIONS 261 bool "Support funcname() { commands; } syntax" 262 default BUSYBOX_DEFAULT_HUSH_FUNCTIONS 263 depends on BUSYBOX_CONFIG_HUSH 264 help 265 Enable support for shell functions in hush. +800 bytes. 266 267config BUSYBOX_CONFIG_HUSH_LOCAL 268 bool "Support local builtin" 269 default BUSYBOX_DEFAULT_HUSH_LOCAL 270 depends on BUSYBOX_CONFIG_HUSH_FUNCTIONS 271 help 272 Enable support for local variables in functions. 273 274config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT 275 bool "Pseudorandom generator and $RANDOM variable" 276 default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT 277 depends on BUSYBOX_CONFIG_HUSH 278 help 279 Enable pseudorandom generator and dynamic variable "$RANDOM". 280 Each read of "$RANDOM" will generate a new pseudorandom value. 281 282config BUSYBOX_CONFIG_HUSH_EXPORT_N 283 bool "Support 'export -n' option" 284 default BUSYBOX_DEFAULT_HUSH_EXPORT_N 285 depends on BUSYBOX_CONFIG_HUSH 286 help 287 export -n unexports variables. It is a bash extension. 288 289config BUSYBOX_CONFIG_HUSH_MODE_X 290 bool "Support 'hush -x' option and 'set -x' command" 291 default BUSYBOX_DEFAULT_HUSH_MODE_X 292 depends on BUSYBOX_CONFIG_HUSH 293 help 294 This instructs hush to print commands before execution. 295 Adds ~300 bytes. 296 297config BUSYBOX_CONFIG_MSH 298 bool "msh (deprecated: aliased to hush)" 299 default BUSYBOX_DEFAULT_MSH 300 select BUSYBOX_CONFIG_HUSH 301 help 302 msh is deprecated and will be removed, please migrate to hush. 303 304 305 306choice 307 prompt "Choose which shell is aliased to 'sh' name" 308 default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH 309 help 310 Choose which shell you want to be executed by 'sh' alias. 311 The ash shell is the most bash compatible and full featured one. 312 313# note: cannot use "select ASH" here, it breaks "make allnoconfig" 314config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH 315 depends on BUSYBOX_CONFIG_ASH 316 bool "ash" 317 depends on !BUSYBOX_CONFIG_NOMMU 318 319config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH 320 depends on BUSYBOX_CONFIG_HUSH 321 bool "hush" 322 323config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE 324 bool "none" 325 326endchoice 327 328choice 329 prompt "Choose which shell is aliased to 'bash' name" 330 default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE 331 help 332 Choose which shell you want to be executed by 'bash' alias. 333 The ash shell is the most bash compatible and full featured one. 334 335 Note that selecting this option does not switch on any bash 336 compatibility code. It merely makes it possible to install 337 /bin/bash (sym)link and run scripts which start with 338 #!/bin/bash line. 339 340 Many systems use it in scripts which use bash-specific features, 341 even simple ones like $RANDOM. Without this option, busybox 342 can't be used for running them because it won't recongnize 343 "bash" as a supported applet name. 344 345config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH 346 depends on BUSYBOX_CONFIG_ASH 347 bool "ash" 348 depends on !BUSYBOX_CONFIG_NOMMU 349 350config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH 351 depends on BUSYBOX_CONFIG_HUSH 352 bool "hush" 353 354config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE 355 bool "none" 356 357endchoice 358 359 360config BUSYBOX_CONFIG_SH_MATH_SUPPORT 361 bool "POSIX math support" 362 default BUSYBOX_DEFAULT_SH_MATH_SUPPORT 363 depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH 364 help 365 Enable math support in the shell via $((...)) syntax. 366 367config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64 368 bool "Extend POSIX math support to 64 bit" 369 default BUSYBOX_DEFAULT_SH_MATH_SUPPORT_64 370 depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT 371 help 372 Enable 64-bit math support in the shell. This will make the shell 373 slightly larger, but will allow computation with very large numbers. 374 This is not in POSIX, so do not rely on this in portable code. 375 376config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET 377 bool "Hide message on interactive shell startup" 378 default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET 379 depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH 380 help 381 Remove the busybox introduction when starting a shell. 382 383config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE 384 bool "Standalone shell" 385 default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE 386 depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS 387 help 388 This option causes busybox shells to use busybox applets 389 in preference to executables in the PATH whenever possible. For 390 example, entering the command 'ifconfig' into the shell would cause 391 busybox to use the ifconfig busybox applet. Specifying the fully 392 qualified executable name, such as '/sbin/ifconfig' will still 393 execute the /sbin/ifconfig executable on the filesystem. This option 394 is generally used when creating a statically linked version of busybox 395 for use as a rescue shell, in the event that you screw up your system. 396 397 This is implemented by re-execing /proc/self/exe (typically) 398 with right parameters. Some selected applets ("NOFORK" applets) 399 can even be executed without creating new process. 400 Instead, busybox will call <applet>_main() internally. 401 402 However, this causes problems in chroot jails without mounted /proc 403 and with ps/top (command name can be shown as 'exe' for applets 404 started this way). 405# untrue? 406# Note that this will *also* cause applets to take precedence 407# over shell builtins of the same name. So turning this on will 408# eliminate any performance gained by turning on the builtin "echo" 409# and "test" commands in ash. 410# untrue? 411# Note that when using this option, the shell will attempt to directly 412# run '/bin/busybox'. If you do not have the busybox binary sitting in 413# that exact location with that exact name, this option will not work at 414# all. 415 416config BUSYBOX_CONFIG_FEATURE_SH_NOFORK 417 bool "Run 'nofork' applets directly" 418 default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK 419 depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS 420 help 421 This option causes busybox shells to not execute typical 422 fork/exec/wait sequence, but call <applet>_main directly, 423 if possible. (Sometimes it is not possible: for example, 424 this is not possible in pipes). 425 426 This will be done only for some applets (those which are marked 427 NOFORK in include/applets.h). 428 429 This may significantly speed up some shell scripts. 430 431 This feature is relatively new. Use with care. Report bugs 432 to project mailing list. 433 434config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE 435 bool "Use $HISTFILESIZE" 436 default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE 437 depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH 438 help 439 This option makes busybox shells to use $HISTFILESIZE variable 440 to set shell history size. Note that its max value is capped 441 by "History size" setting in library tuning section. 442 443 444endmenu 445