Changeset 9a87912 in freewrt
- Timestamp:
- Jul 27, 2006, 2:22:26 PM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- 2314460
- Parents:
- bc417a4
- Location:
- package
- Files:
-
- 3 edited
-
Config.shell (modified) (2 diffs)
-
base-files/Makefile (modified) (3 diffs)
-
base-files/default/etc/passwd (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
package/Config.shell
rbc417a4 r9a87912 1 1 # $FreeWRT$ 2 2 3 comment " /bin/sh"3 comment "Shell selection" 4 4 choice 5 prompt "Choose your default shell"5 prompt "Choose the default bourne shell (/bin/sh)" 6 6 default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH 7 7 help … … 69 69 70 70 endchoice 71 72 choice 73 prompt "Choose the login shell for admin" 74 default FWRT_BASEFILES_ADMIN_ASH 75 help 76 Choose a shell which is to be used as the default login 77 shell for the "admin" user. Only shells selected above 78 can be chosen. 79 80 config FWRT_BASEFILES_ADMIN_ASH 81 depends BUSYBOX_CONFIG_ASH 82 bool "ash (busybox)" 83 help 84 Tha 'ash' shell adds about 60k in the default configuration and is 85 the most complete and most pedantically correct shell included with 86 busybox. This shell is actually a derivative of the Debian 'dash' 87 shell (by Herbert Xu), which was created by porting the 'ash' shell 88 (written by Kenneth Almquist) from NetBSD. 89 90 config FWRT_BASEFILES_ADMIN_MKSH 91 depends FWRT_PACKAGE_MKSH 92 bool "mksh" 93 help 94 mksh is the MirBSD enhanced version of the Public Domain Korn 95 shell (pdksh), a bourne-compatible shell which is largely similar 96 to the original AT&T Korn shell. It includes bug fixes and 97 feature improvements in order to produce a modern, robust shell 98 good for interactive and especially script use. Some sh/ksh/pdksh 99 compatibility kludges have been removed. 100 101 config FWRT_BASEFILES_ADMIN_HUSH 102 depends BUSYBOX_CONFIG_HUSH 103 bool "hush (busybox)" 104 help 105 hush is a very small shell (just 18k) and it has fairly complete 106 Bourne shell grammar. It even handles all the normal flow control 107 options such as if/then/elif/else/fi, for/in/do/done, while loops, 108 etc. 109 110 It does not handle case/esac, select, function, here documents ( << 111 word ), arithmetic expansion, aliases, brace expansion, tilde 112 expansion, &> and >& redirection of stdout+stderr, etc. 113 114 config FWRT_BASEFILES_ADMIN_LASH 115 depends BUSYBOX_CONFIG_LASH 116 bool "lash (busybox)" 117 help 118 lash is the very smallest shell (adds just 10k) and it is quite 119 usable as a command prompt, but it is not suitable for any but the 120 most trivial scripting (such as an initrd that calls insmod a few 121 times) since it does not understand any Bourne shell grammar. It 122 does handle pipes, redirects, and job control though. Adding in 123 command editing makes it a very nice lightweight command prompt. 124 125 config FWRT_BASEFILES_ADMIN_MSH 126 depends BUSYBOX_CONFIG_MSH 127 bool "msh (busybox)" 128 help 129 The minix shell (adds just 30k) is quite complete and handles things 130 like for/do/done, case/esac and all the things you expect a Bourne 131 shell to do. It is not always pedantically correct about Bourne 132 shell grammar (try running the shell testscript "tests/sh.testcases" 133 on it and compare vs bash) but for most things it works quite well. 134 It also uses only vfork, so it can be used on uClinux systems. 135 136 config FWRT_BASEFILES_ADMIN_SH 137 bool "/bin/sh" 138 help 139 Fall-back: use /bin/sh, whatever it is. 140 141 endchoice -
package/base-files/Makefile
rbc417a4 r9a87912 4 4 5 5 PKG_NAME:= base-files 6 PKG_RELEASE:= 86 PKG_RELEASE:= 9 7 7 WRKSRC= ${WRKDIR}/base-files 8 8 … … 46 46 endif 47 47 48 ADMIN_SHELL:= /bin/sh 49 ifeq (${FWRT_BASEFILES_ADMIN_ASH},y) 50 ADMIN_SHELL:= /bin/ash 51 endif 52 ifeq (${FWRT_BASEFILES_ADMIN_MKSH},y) 53 ADMIN_SHELL:= /bin/mksh 54 endif 55 ifeq (${FWRT_BASEFILES_ADMIN_HUSH},y) 56 ADMIN_SHELL:= /bin/hush 57 endif 58 ifeq (${FWRT_BASEFILES_ADMIN_LASH},y) 59 ADMIN_SHELL:= /bin/lash 60 endif 61 ifeq (${FWRT_BASEFILES_ADMIN_MSH},y) 62 ADMIN_SHELL:= /bin/msh 63 endif 64 48 65 $(WRKBUILD)/.prepared: 49 66 mkdir -p $(WRKBUILD) $(PACKAGE_DIR) … … 66 83 test -z $(FWRT_RUNTIME_PASSWORD) || \ 67 84 $(SED) 's,\*NP\*,$(MD5CRYPT),g' $(IDIR_BASE)/etc/passwd 85 $(SED) 's!@SHELL@!${ADMIN_SHELL}!g' $(IDIR_BASE)/etc/passwd 68 86 test -z $(FWRT_RUNTIME_SSHKEY) || ( \ 69 87 mkdir -p $(IDIR_BASE)/etc/dropbear; \ -
package/base-files/default/etc/passwd
rbc417a4 r9a87912 1 1 root:*NP*:0:0:root:/tmp:/bin/sh 2 admin:*NP*:100:100:admin:/tmp: /bin/ash2 admin:*NP*:100:100:admin:/tmp:@SHELL@ 3 3 nobody:*:65534:65534:nobody:/var:/bin/false
Note:
See TracChangeset
for help on using the changeset viewer.
