aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 12:56:34 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 12:56:34 +1000
commitc31744ca1a86b2276c37c6d9a884660185debed6 (patch)
treebb051c35c3430a3793ceef173a01cb522fb4ae05 /shell
parent1a286d510c2125bdab601ce47afd4d27b6ce6f41 (diff)
parente329089c62ed813e97344f8c61d7dc34221fd5ee (diff)
downloadbusybox-w32-c31744ca1a86b2276c37c6d9a884660185debed6.tar.gz
busybox-w32-c31744ca1a86b2276c37c6d9a884660185debed6.tar.bz2
busybox-w32-c31744ca1a86b2276c37c6d9a884660185debed6.zip
Merge branch 'origin/master' (early part)
Diffstat (limited to 'shell')
-rw-r--r--shell/Config.src107
-rw-r--r--shell/Kbuild.src3
-rw-r--r--shell/hush.c2
3 files changed, 60 insertions, 52 deletions
diff --git a/shell/Config.src b/shell/Config.src
index 234d05367..800911966 100644
--- a/shell/Config.src
+++ b/shell/Config.src
@@ -5,57 +5,7 @@
5 5
6menu "Shells" 6menu "Shells"
7 7
8choice 8INSERT
9 prompt "Choose which shell is aliased to 'sh' name"
10 default FEATURE_SH_IS_ASH
11 help
12 Choose which shell you want to be executed by 'sh' alias.
13 The ash shell is the most bash compatible and full featured one.
14
15config FEATURE_SH_IS_ASH
16 select ASH
17 bool "ash"
18 depends on !NOMMU
19
20config FEATURE_SH_IS_HUSH
21 select HUSH
22 bool "hush"
23
24config FEATURE_SH_IS_NONE
25 bool "none"
26
27endchoice
28
29choice
30 prompt "Choose which shell is aliased to 'bash' name"
31 default FEATURE_BASH_IS_NONE
32 help
33 Choose which shell you want to be executed by 'bash' alias.
34 The ash shell is the most bash compatible and full featured one.
35
36 Note that selecting this option does not switch on any bash
37 compatibility code. It merely makes it possible to install
38 /bin/bash (sym)link and run scripts which start with
39 #!/bin/bash line.
40
41 Many systems use it in scripts which use bash-specific features,
42 even simple ones like $RANDOM. Without this option, busybox
43 can't be used for running them because it won't recongnize
44 "bash" as a supported applet name.
45
46config FEATURE_BASH_IS_ASH
47 select ASH
48 bool "ash"
49 depends on !NOMMU
50
51config FEATURE_BASH_IS_HUSH
52 select HUSH
53 bool "hush"
54
55config FEATURE_BASH_IS_NONE
56 bool "none"
57
58endchoice
59 9
60config ASH 10config ASH
61 bool "ash" 11 bool "ash"
@@ -266,6 +216,61 @@ config HUSH_RANDOM_SUPPORT
266 Enable pseudorandom generator and dynamic variable "$RANDOM". 216 Enable pseudorandom generator and dynamic variable "$RANDOM".
267 Each read of "$RANDOM" will generate a new pseudorandom value. 217 Each read of "$RANDOM" will generate a new pseudorandom value.
268 218
219
220choice
221 prompt "Choose which shell is aliased to 'sh' name"
222 default FEATURE_SH_IS_ASH
223 help
224 Choose which shell you want to be executed by 'sh' alias.
225 The ash shell is the most bash compatible and full featured one.
226
227# note: cannot use "select ASH" here, it breaks "make allnoconfig"
228config FEATURE_SH_IS_ASH
229 depends on ASH
230 bool "ash"
231 depends on !NOMMU
232
233config FEATURE_SH_IS_HUSH
234 depends on HUSH
235 bool "hush"
236
237config FEATURE_SH_IS_NONE
238 bool "none"
239
240endchoice
241
242choice
243 prompt "Choose which shell is aliased to 'bash' name"
244 default FEATURE_BASH_IS_NONE
245 help
246 Choose which shell you want to be executed by 'bash' alias.
247 The ash shell is the most bash compatible and full featured one.
248
249 Note that selecting this option does not switch on any bash
250 compatibility code. It merely makes it possible to install
251 /bin/bash (sym)link and run scripts which start with
252 #!/bin/bash line.
253
254 Many systems use it in scripts which use bash-specific features,
255 even simple ones like $RANDOM. Without this option, busybox
256 can't be used for running them because it won't recongnize
257 "bash" as a supported applet name.
258
259config FEATURE_BASH_IS_ASH
260 depends on ASH
261 bool "ash"
262 depends on !NOMMU
263
264config FEATURE_BASH_IS_HUSH
265 depends on HUSH
266 bool "hush"
267
268config FEATURE_BASH_IS_NONE
269 bool "none"
270
271endchoice
272
273
269config LASH 274config LASH
270 bool "lash (deprecated: aliased to hush)" 275 bool "lash (deprecated: aliased to hush)"
271 default n 276 default n
diff --git a/shell/Kbuild.src b/shell/Kbuild.src
index 8bdb68b11..d76b35386 100644
--- a/shell/Kbuild.src
+++ b/shell/Kbuild.src
@@ -5,6 +5,9 @@
5# Licensed under the GPL v2, see the file LICENSE in this tarball. 5# Licensed under the GPL v2, see the file LICENSE in this tarball.
6 6
7lib-y:= 7lib-y:=
8
9INSERT
10
8lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o shell_common.o 11lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o shell_common.o
9lib-$(CONFIG_HUSH) += hush.o match.o shell_common.o 12lib-$(CONFIG_HUSH) += hush.o match.o shell_common.o
10lib-$(CONFIG_CTTYHACK) += cttyhack.o 13lib-$(CONFIG_CTTYHACK) += cttyhack.o
diff --git a/shell/hush.c b/shell/hush.c
index 4cccf31a4..4832e2c48 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -7103,7 +7103,7 @@ int hush_main(int argc, char **argv)
7103 break; 7103 break;
7104#if !BB_MMU 7104#if !BB_MMU
7105 case '<': /* "big heredoc" support */ 7105 case '<': /* "big heredoc" support */
7106 full_write(STDOUT_FILENO, optarg, strlen(optarg)); 7106 full_write1_str(optarg);
7107 _exit(0); 7107 _exit(0);
7108 case '$': { 7108 case '$': {
7109 unsigned long long empty_trap_mask; 7109 unsigned long long empty_trap_mask;