diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-04-07 09:34:27 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-04-07 09:34:27 +0000 |
commit | 075dd81c4460c027cf22800808993df3c07281f5 (patch) | |
tree | 92e71f0a400931ed106bfcedee0420b408adb282 | |
parent | b80c67e32c87bc674e84993f8d2d06e8f2c4228d (diff) | |
download | busybox-w32-075dd81c4460c027cf22800808993df3c07281f5.tar.gz busybox-w32-075dd81c4460c027cf22800808993df3c07281f5.tar.bz2 busybox-w32-075dd81c4460c027cf22800808993df3c07281f5.zip |
Remove the CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN option. It was sortof
stupid and didn't work properly anyways.
-rw-r--r-- | debian/config-static | 1 | ||||
-rw-r--r-- | debian/config-udeb | 1 | ||||
-rw-r--r-- | debian/config-udeb-linux | 1 | ||||
-rw-r--r-- | shell/Config.in | 18 | ||||
-rw-r--r-- | shell/ash.c | 6 | ||||
-rw-r--r-- | shell/hush.c | 12 | ||||
-rw-r--r-- | shell/lash.c | 9 | ||||
-rw-r--r-- | shell/msh.c | 3 |
8 files changed, 8 insertions, 43 deletions
diff --git a/debian/config-static b/debian/config-static index 5114da6b1..035354683 100644 --- a/debian/config-static +++ b/debian/config-static | |||
@@ -437,7 +437,6 @@ CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y | |||
437 | CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION=y | 437 | CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION=y |
438 | CONFIG_FEATURE_COMMAND_HISTORY=15 | 438 | CONFIG_FEATURE_COMMAND_HISTORY=15 |
439 | CONFIG_FEATURE_SH_STANDALONE_SHELL=y | 439 | CONFIG_FEATURE_SH_STANDALONE_SHELL=y |
440 | CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN=y | ||
441 | CONFIG_FEATURE_SH_FANCY_PROMPT=y | 440 | CONFIG_FEATURE_SH_FANCY_PROMPT=y |
442 | # CONFIG_FEATURE_SH_EXTRA_QUIET is not set | 441 | # CONFIG_FEATURE_SH_EXTRA_QUIET is not set |
443 | 442 | ||
diff --git a/debian/config-udeb b/debian/config-udeb index 3cb612f7e..7359abcfe 100644 --- a/debian/config-udeb +++ b/debian/config-udeb | |||
@@ -359,7 +359,6 @@ CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y | |||
359 | # CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set | 359 | # CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set |
360 | CONFIG_FEATURE_COMMAND_HISTORY=15 | 360 | CONFIG_FEATURE_COMMAND_HISTORY=15 |
361 | CONFIG_FEATURE_SH_STANDALONE_SHELL=y | 361 | CONFIG_FEATURE_SH_STANDALONE_SHELL=y |
362 | # CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN is not set | ||
363 | CONFIG_FEATURE_SH_FANCY_PROMPT=y | 362 | CONFIG_FEATURE_SH_FANCY_PROMPT=y |
364 | # CONFIG_FEATURE_SH_EXTRA_QUIET is not set | 363 | # CONFIG_FEATURE_SH_EXTRA_QUIET is not set |
365 | 364 | ||
diff --git a/debian/config-udeb-linux b/debian/config-udeb-linux index be4e9fb48..b33fb22b0 100644 --- a/debian/config-udeb-linux +++ b/debian/config-udeb-linux | |||
@@ -368,7 +368,6 @@ CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y | |||
368 | # CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set | 368 | # CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set |
369 | CONFIG_FEATURE_COMMAND_HISTORY=15 | 369 | CONFIG_FEATURE_COMMAND_HISTORY=15 |
370 | CONFIG_FEATURE_SH_STANDALONE_SHELL=y | 370 | CONFIG_FEATURE_SH_STANDALONE_SHELL=y |
371 | # CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN is not set | ||
372 | CONFIG_FEATURE_SH_FANCY_PROMPT=y | 371 | CONFIG_FEATURE_SH_FANCY_PROMPT=y |
373 | # CONFIG_FEATURE_SH_EXTRA_QUIET is not set | 372 | # CONFIG_FEATURE_SH_EXTRA_QUIET is not set |
374 | 373 | ||
diff --git a/shell/Config.in b/shell/Config.in index 34baaa45c..b064ed41b 100644 --- a/shell/Config.in +++ b/shell/Config.in | |||
@@ -160,16 +160,14 @@ config CONFIG_FEATURE_SH_STANDALONE_SHELL | |||
160 | default n | 160 | default n |
161 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH | 161 | depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH |
162 | help | 162 | help |
163 | Have all the busybox commands built into the shell, creating | 163 | This option causes the selected busybox shell to use busybox applets |
164 | a standalone shell. | 164 | in preference to executables in the PATH whenever possible. For |
165 | 165 | example, entering the command 'ifconfig' into the shell would cause | |
166 | config CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN | 166 | busybox to use the ifconfig busybox applet. Specifying the fully |
167 | bool "Standalone shell -- applets always win" | 167 | qualified executable name, such as '/sbin/ifconfig' will still |
168 | default n | 168 | execute the /sbin/ifconfig executable on the filesystem. This option |
169 | depends on CONFIG_FEATURE_SH_STANDALONE_SHELL | 169 | is generally used when creating a staticly linked version of busybox |
170 | help | 170 | for use as a rescue shell, in the event that you screw up your system. |
171 | Use a command builtin to the shell over one with the same name, | ||
172 | that may be on the system. | ||
173 | 171 | ||
174 | config CONFIG_FEATURE_COMMAND_EDITING | 172 | config CONFIG_FEATURE_COMMAND_EDITING |
175 | bool "command line editing" | 173 | bool "command line editing" |
diff --git a/shell/ash.c b/shell/ash.c index 5ebc8aced..1a0e0aa6e 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -3717,15 +3717,9 @@ tryexec(char *cmd, char **argv, char **envp) | |||
3717 | int flg_bb = 0; | 3717 | int flg_bb = 0; |
3718 | char *name = cmd; | 3718 | char *name = cmd; |
3719 | 3719 | ||
3720 | #ifdef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN | ||
3721 | name = bb_get_last_path_component(name); | ||
3722 | if(find_applet_by_name(name) != NULL) | ||
3723 | flg_bb = 1; | ||
3724 | #else | ||
3725 | if(strchr(name, '/') == NULL && find_applet_by_name(name) != NULL) { | 3720 | if(strchr(name, '/') == NULL && find_applet_by_name(name) != NULL) { |
3726 | flg_bb = 1; | 3721 | flg_bb = 1; |
3727 | } | 3722 | } |
3728 | #endif | ||
3729 | if(flg_bb) { | 3723 | if(flg_bb) { |
3730 | char **ap; | 3724 | char **ap; |
3731 | char **new; | 3725 | char **new; |
diff --git a/shell/hush.c b/shell/hush.c index 0a32099c7..ad5ddf0d5 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -1124,18 +1124,6 @@ static void pseudo_exec(struct child_prog *child) | |||
1124 | char** argv_l=child->argv; | 1124 | char** argv_l=child->argv; |
1125 | char *name = child->argv[0]; | 1125 | char *name = child->argv[0]; |
1126 | 1126 | ||
1127 | #ifdef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN | ||
1128 | /* Following discussions from November 2000 on the busybox mailing | ||
1129 | * list, the default configuration, (without | ||
1130 | * bb_get_last_path_component()) lets the user force use of an | ||
1131 | * external command by specifying the full (with slashes) filename. | ||
1132 | * If you enable CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN, then applets | ||
1133 | * _aways_ override external commands, so if you want to run | ||
1134 | * /bin/cat, it will use BusyBox cat even if /bin/cat exists on the | ||
1135 | * filesystem and is _not_ busybox. Some systems may want this, | ||
1136 | * most do not. */ | ||
1137 | name = bb_get_last_path_component(name); | ||
1138 | #endif | ||
1139 | /* Count argc for use in a second... */ | 1127 | /* Count argc for use in a second... */ |
1140 | for(argc_l=0;*argv_l!=NULL; argv_l++, argc_l++); | 1128 | for(argc_l=0;*argv_l!=NULL; argv_l++, argc_l++); |
1141 | optind = 1; | 1129 | optind = 1; |
diff --git a/shell/lash.c b/shell/lash.c index e20c2a20e..b46cee807 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -1275,15 +1275,6 @@ static int pseudo_exec(struct child_prog *child) | |||
1275 | */ | 1275 | */ |
1276 | name = child->argv[0]; | 1276 | name = child->argv[0]; |
1277 | 1277 | ||
1278 | #ifdef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN | ||
1279 | /* If you enable CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN, then | ||
1280 | * if you run /bin/cat, it will use BusyBox cat even if | ||
1281 | * /bin/cat exists on the filesystem and is _not_ busybox. | ||
1282 | * Some systems want this, others do not. Choose wisely. :-) | ||
1283 | */ | ||
1284 | name = bb_get_last_path_component(name); | ||
1285 | #endif | ||
1286 | |||
1287 | { | 1278 | { |
1288 | char** argv_l=child->argv; | 1279 | char** argv_l=child->argv; |
1289 | int argc_l; | 1280 | int argc_l; |
diff --git a/shell/msh.c b/shell/msh.c index e7059507a..5dc0b2b51 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -2836,9 +2836,6 @@ char *c, **v, **envp; | |||
2836 | 2836 | ||
2837 | #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL | 2837 | #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL |
2838 | char *name = c; | 2838 | char *name = c; |
2839 | #ifdef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN | ||
2840 | name = bb_get_last_path_component(name); | ||
2841 | #endif | ||
2842 | optind = 1; | 2839 | optind = 1; |
2843 | if (find_applet_by_name(name)) { | 2840 | if (find_applet_by_name(name)) { |
2844 | /* We have to exec here since we vforked. Running | 2841 | /* We have to exec here since we vforked. Running |