source: freewrt/package/Config.shell@ 356d3a6

freewrt_1_0 freewrt_2_0
Last change on this file since 356d3a6 was 356d3a6, checked in by Thorsten Glaser <tg@…>, 19 years ago
  • bring shell configuration in one single place
  • enhance comments; make sure we always need one /bin/sh (currently not enforced; there will be no root shell selectable if none is available; the user shell will default to /bin/sh but that isn't supplied) and one /bin/ash (either busybox ash or mksh, both work fine)

Now feel free to go and add a GNU b(lo)a(t)sh package...
configuration is similar as mksh, and it can also be used
as /bin/sh (obviously) and /bin/ash.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@443 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 5.9 KB
Line 
1# $FreeWRT$
2
3comment "Shell selection --"
4comment "Building shell packages and configuring their features"
5source "package/busybox/config/shell/Config.in"
6source "package/mksh/Config.in"
7comment "Selecting appropriate shells from these enabled above"
8choice
9 prompt "Choose the default bourne shell (/bin/sh)"
10 default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH if BUSYBOX_CONFIG_ASH
11 default FWRT_PACKAGE_MKSH_AS_BINSH if FWRT_PACKAGE_MKSH
12 help
13 Choose a shell which is to be used for /bin/sh.
14 The ash shell is the most bash-compatible shell
15 and full-featured one in busybox; mksh is a bit
16 more heavy-weight but feature-complete. The other
17 shells probably do not work as /bin/sh in FreeWRT.
18
19config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
20 depends BUSYBOX_CONFIG_ASH
21 bool "ash (busybox)"
22 help
23 Tha 'ash' shell adds about 60k in the default configuration and is
24 the most complete and most pedantically correct shell included with
25 busybox. This shell is actually a derivative of the Debian 'dash'
26 shell (by Herbert Xu), which was created by porting the 'ash' shell
27 (written by Kenneth Almquist) from NetBSD.
28
29config FWRT_PACKAGE_MKSH_AS_BINSH
30 depends FWRT_PACKAGE_MKSH
31 select BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
32 bool "mksh"
33 help
34 mksh is the MirBSD enhanced version of the Public Domain Korn
35 shell (pdksh), a bourne-compatible shell which is largely similar
36 to the original AT&T Korn shell. It includes bug fixes and
37 feature improvements in order to produce a modern, robust shell
38 good for interactive and especially script use. Some sh/ksh/pdksh
39 compatibility kludges have been removed.
40
41config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
42 depends BUSYBOX_CONFIG_HUSH
43 bool "hush (busybox)"
44 help
45 hush is a very small shell (just 18k) and it has fairly complete
46 Bourne shell grammar. It even handles all the normal flow control
47 options such as if/then/elif/else/fi, for/in/do/done, while loops,
48 etc.
49
50 It does not handle case/esac, select, function, here documents ( <<
51 word ), arithmetic expansion, aliases, brace expansion, tilde
52 expansion, &> and >& redirection of stdout+stderr, etc.
53
54config BUSYBOX_CONFIG_FEATURE_SH_IS_LASH
55 depends BUSYBOX_CONFIG_LASH
56 bool "lash (busybox)"
57 help
58 lash is the very smallest shell (adds just 10k) and it is quite
59 usable as a command prompt, but it is not suitable for any but the
60 most trivial scripting (such as an initrd that calls insmod a few
61 times) since it does not understand any Bourne shell grammar. It
62 does handle pipes, redirects, and job control though. Adding in
63 command editing makes it a very nice lightweight command prompt.
64
65config BUSYBOX_CONFIG_FEATURE_SH_IS_MSH
66 depends BUSYBOX_CONFIG_MSH
67 bool "msh (busybox)"
68 help
69 The minix shell (adds just 30k) is quite complete and handles things
70 like for/do/done, case/esac and all the things you expect a Bourne
71 shell to do. It is not always pedantically correct about Bourne
72 shell grammar (try running the shell testscript "tests/sh.testcases"
73 on it and compare vs bash) but for most things it works quite well.
74 It also uses only vfork, so it can be used on uClinux systems.
75
76endchoice
77
78choice
79 prompt "Choose the login shell for the admin user"
80 default FWRT_BASEFILES_ADMIN_ASH if BUSYBOX_CONFIG_ASH
81 default FWRT_BASEFILES_ADMIN_MKSH if FWRT_PACKAGE_MKSH
82 default FWRT_BASEFILES_ADMIN_SH if (!BUSYBOX_CONFIG_ASH && !FWRT_PACKAGE_MKSH)
83 help
84 Choose a shell which is to be used as the default login
85 shell for the "admin" user. Only shells selected above
86 can be chosen.
87
88config FWRT_BASEFILES_ADMIN_ASH
89 depends BUSYBOX_CONFIG_ASH
90 bool "ash (busybox)"
91 help
92 Tha 'ash' shell adds about 60k in the default configuration and is
93 the most complete and most pedantically correct shell included with
94 busybox. This shell is actually a derivative of the Debian 'dash'
95 shell (by Herbert Xu), which was created by porting the 'ash' shell
96 (written by Kenneth Almquist) from NetBSD.
97
98config FWRT_BASEFILES_ADMIN_MKSH
99 depends FWRT_PACKAGE_MKSH
100 bool "mksh"
101 help
102 mksh is the MirBSD enhanced version of the Public Domain Korn
103 shell (pdksh), a bourne-compatible shell which is largely similar
104 to the original AT&T Korn shell. It includes bug fixes and
105 feature improvements in order to produce a modern, robust shell
106 good for interactive and especially script use. Some sh/ksh/pdksh
107 compatibility kludges have been removed.
108
109config FWRT_BASEFILES_ADMIN_HUSH
110 depends BUSYBOX_CONFIG_HUSH
111 bool "hush (busybox)"
112 help
113 hush is a very small shell (just 18k) and it has fairly complete
114 Bourne shell grammar. It even handles all the normal flow control
115 options such as if/then/elif/else/fi, for/in/do/done, while loops,
116 etc.
117
118 It does not handle case/esac, select, function, here documents ( <<
119 word ), arithmetic expansion, aliases, brace expansion, tilde
120 expansion, &> and >& redirection of stdout+stderr, etc.
121
122config FWRT_BASEFILES_ADMIN_LASH
123 depends BUSYBOX_CONFIG_LASH
124 bool "lash (busybox)"
125 help
126 lash is the very smallest shell (adds just 10k) and it is quite
127 usable as a command prompt, but it is not suitable for any but the
128 most trivial scripting (such as an initrd that calls insmod a few
129 times) since it does not understand any Bourne shell grammar. It
130 does handle pipes, redirects, and job control though. Adding in
131 command editing makes it a very nice lightweight command prompt.
132
133config FWRT_BASEFILES_ADMIN_MSH
134 depends BUSYBOX_CONFIG_MSH
135 bool "msh (busybox)"
136 help
137 The minix shell (adds just 30k) is quite complete and handles things
138 like for/do/done, case/esac and all the things you expect a Bourne
139 shell to do. It is not always pedantically correct about Bourne
140 shell grammar (try running the shell testscript "tests/sh.testcases"
141 on it and compare vs bash) but for most things it works quite well.
142 It also uses only vfork, so it can be used on uClinux systems.
143
144config FWRT_BASEFILES_ADMIN_SH
145 bool "/bin/sh"
146 help
147 Fall-back: use /bin/sh, whatever it is.
148
149endchoice
Note: See TracBrowser for help on using the repository browser.