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