msh: aliased to hush

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-08-21 00:05:51 +02:00
parent 263cff9a2f
commit 1cc4b13917
7 changed files with 17 additions and 22 deletions

8
TODO
View File

@ -16,14 +16,10 @@ Rob Landley suggested these:
Figure out where we need utf8 support, and add it. Figure out where we need utf8 support, and add it.
sh sh
The command shell situation is a big mess. We have three different The command shell situation is a mess. We have two different
shells that don't really share any code, and the "standalone shell" doesn't shells that don't really share any code, and the "standalone shell" doesn't
work all that well (especially not in a chroot environment), due to apps not work all that well (especially not in a chroot environment), due to apps not
being reentrant. being reentrant.
lash is phased out. hush can be configured down to be nearly as small,
but less buggy :)
init
General cleanup (should use ENABLE_FEATURE_INIT_SYSLOG).
Do a SUSv3 audit Do a SUSv3 audit
Look at the full Single Unix Specification version 3 (available online at Look at the full Single Unix Specification version 3 (available online at
"http://www.opengroup.org/onlinepubs/009695399/nfindex.html") and "http://www.opengroup.org/onlinepubs/009695399/nfindex.html") and
@ -265,7 +261,7 @@ Minor stuff:
--- ---
possible code duplication ingroup() and is_a_group_member() possible code duplication ingroup() and is_a_group_member()
--- ---
Move __get_hz() to a better place and (re)use it in route.c, ash.c, msh.c Move __get_hz() to a better place and (re)use it in route.c, ash.c
--- ---
See grep -r strtod See grep -r strtod
Alot of duplication that wants cleanup. Alot of duplication that wants cleanup.

View File

@ -347,7 +347,6 @@ IF_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_DROP))
IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, setuidgid)) IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, setuidgid))
IF_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, _BB_DIR_BIN, _BB_SUID_DROP, sh)) IF_FEATURE_SH_IS_ASH(APPLET_ODDNAME(sh, ash, _BB_DIR_BIN, _BB_SUID_DROP, sh))
IF_FEATURE_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, _BB_DIR_BIN, _BB_SUID_DROP, sh)) IF_FEATURE_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, _BB_DIR_BIN, _BB_SUID_DROP, sh))
IF_FEATURE_SH_IS_MSH(APPLET_ODDNAME(sh, msh, _BB_DIR_BIN, _BB_SUID_DROP, sh))
IF_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha1sum)) IF_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha1sum))
IF_SHA256SUM(APPLET_ODDNAME(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha256sum)) IF_SHA256SUM(APPLET_ODDNAME(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha256sum))
IF_SHA512SUM(APPLET_ODDNAME(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha512sum)) IF_SHA512SUM(APPLET_ODDNAME(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha512sum))

View File

@ -119,13 +119,10 @@
#define ash_full_usage "" #define ash_full_usage ""
#define hush_trivial_usage NOUSAGE_STR #define hush_trivial_usage NOUSAGE_STR
#define hush_full_usage "" #define hush_full_usage ""
#define lash_trivial_usage NOUSAGE_STR
#define lash_full_usage ""
#define msh_trivial_usage NOUSAGE_STR #define msh_trivial_usage NOUSAGE_STR
#define msh_full_usage "" #define msh_full_usage ""
#define bbsh_trivial_usage \
"[FILE]...\n" \
"or: bbsh -c command [args]..."
#define bbsh_full_usage "\n\n" \
"The bbsh shell (command interpreter)"
#define awk_trivial_usage \ #define awk_trivial_usage \
"[OPTIONS] [AWK_PROGRAM] [FILE]..." "[OPTIONS] [AWK_PROGRAM] [FILE]..."
@ -3904,12 +3901,6 @@
"and will not be affected by keyboard signals (Ctrl-C etc).\n" \ "and will not be affected by keyboard signals (Ctrl-C etc).\n" \
"See setsid(2) for details." \ "See setsid(2) for details." \
#define lash_trivial_usage \
"[FILE]...\n" \
"or: sh -c command [args]..."
#define lash_full_usage "\n\n" \
"lash is deprecated, please use hush"
#define last_trivial_usage \ #define last_trivial_usage \
""IF_FEATURE_LAST_FANCY("[-HW] [-f file]") ""IF_FEATURE_LAST_FANCY("[-HW] [-f file]")
#define last_full_usage "\n\n" \ #define last_full_usage "\n\n" \

View File

@ -24,9 +24,9 @@ config FEATURE_SH_IS_HUSH
#### select LASH #### select LASH
#### bool "lash" #### bool "lash"
config FEATURE_SH_IS_MSH ####config FEATURE_SH_IS_MSH
select MSH #### select MSH
bool "msh" #### bool "msh"
config FEATURE_SH_IS_NONE config FEATURE_SH_IS_NONE
bool "none" bool "none"
@ -260,6 +260,7 @@ config LASH
config MSH config MSH
bool "msh (deprecated: please use hush)" bool "msh (deprecated: please use hush)"
default n default n
select HUSH
help help
msh is deprecated and will be removed, please migrate to hush. msh is deprecated and will be removed, please migrate to hush.
If there is a feature msh has but hush does not, please let us know. If there is a feature msh has but hush does not, please let us know.

View File

@ -7,6 +7,5 @@
lib-y:= lib-y:=
lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o lib-$(CONFIG_ASH) += ash.o ash_ptr_hack.o
lib-$(CONFIG_HUSH) += hush.o match.o lib-$(CONFIG_HUSH) += hush.o match.o
lib-$(CONFIG_MSH) += msh.o
lib-$(CONFIG_CTTYHACK) += cttyhack.o lib-$(CONFIG_CTTYHACK) += cttyhack.o
lib-$(CONFIG_SH_MATH_SUPPORT) += math.o lib-$(CONFIG_SH_MATH_SUPPORT) += math.o

View File

@ -6746,6 +6746,15 @@ int lash_main(int argc, char **argv)
} }
#endif #endif
#if ENABLE_MSH
int msh_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int msh_main(int argc, char **argv)
{
//bb_error_msg("msh is deprecated, please use hush instead");
return hush_main(argc, argv);
}
#endif
/* /*
* Built-ins * Built-ins