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