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