[BusyBox-cvs] busybox/shell Config.in, 1.14, 1.15 ash.c, 1.94, 1.95 hush.c, 1.65, 1.66 lash.c, 1.158, 1.159 msh.c, 1.16, 1.17

Erik Andersen andersen at busybox.net
Wed Apr 7 09:34:29 UTC 2004


Update of /var/cvs/busybox/shell
In directory nail:/tmp/cvs-serv30135/shell

Modified Files:
	Config.in ash.c hush.c lash.c msh.c 
Log Message:
Remove the CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN option.  It was sortof
stupid and didn't work properly anyways.


Index: msh.c
===================================================================
RCS file: /var/cvs/busybox/shell/msh.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- a/msh.c	15 Mar 2004 08:29:13 -0000	1.16
+++ b/msh.c	7 Apr 2004 09:34:26 -0000	1.17
@@ -2836,9 +2836,6 @@
 
 #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
 	char *name = c;
-#ifdef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
-	name = bb_get_last_path_component(name);
-#endif
 	optind = 1;
 	if (find_applet_by_name(name)) {
 		/* We have to exec here since we vforked.  Running

Index: Config.in
===================================================================
RCS file: /var/cvs/busybox/shell/Config.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- a/Config.in	16 Mar 2004 05:14:10 -0000	1.14
+++ b/Config.in	7 Apr 2004 09:34:26 -0000	1.15
@@ -160,16 +160,14 @@
 	default n
 	depends on CONFIG_MSH || CONFIG_LASH || CONFIG_HUSH || CONFIG_ASH
 	help
-	  Have all the busybox commands built into the shell, creating
-	  a standalone shell.
-
-config CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
-	bool "Standalone shell -- applets always win"
-	default n
-	depends on CONFIG_FEATURE_SH_STANDALONE_SHELL
-	help
-	  Use a command builtin to the shell over one with the same name,
-	  that may be on the system.
+	  This option causes the selected busybox shell to use busybox applets
+	  in preference to executables in the PATH whenever possible.  For
+	  example, entering the command 'ifconfig' into the shell would cause
+	  busybox to use the ifconfig busybox applet.  Specifying the fully
+	  qualified executable name, such as '/sbin/ifconfig' will still
+	  execute the /sbin/ifconfig executable on the filesystem.  This option
+	  is generally used when creating a staticly linked version of busybox
+	  for use as a rescue shell, in the event that you screw up your system.
 
 config CONFIG_FEATURE_COMMAND_EDITING
 	bool "command line editing"

Index: hush.c
===================================================================
RCS file: /var/cvs/busybox/shell/hush.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- a/hush.c	27 Mar 2004 10:02:45 -0000	1.65
+++ b/hush.c	7 Apr 2004 09:34:26 -0000	1.66
@@ -1124,18 +1124,6 @@
 			char** argv_l=child->argv;
 			char *name = child->argv[0];
 
-#ifdef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
-			/* Following discussions from November 2000 on the busybox mailing
-			 * list, the default configuration, (without
-			 * bb_get_last_path_component()) lets the user force use of an
-			 * external command by specifying the full (with slashes) filename.
-			 * If you enable CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN, then applets
-			 * _aways_ override external commands, so if you want to run
-			 * /bin/cat, it will use BusyBox cat even if /bin/cat exists on the
-			 * filesystem and is _not_ busybox.  Some systems may want this,
-			 * most do not.  */
-			name = bb_get_last_path_component(name);
-#endif
 			/* Count argc for use in a second... */
 			for(argc_l=0;*argv_l!=NULL; argv_l++, argc_l++);
 			optind = 1;

Index: lash.c
===================================================================
RCS file: /var/cvs/busybox/shell/lash.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- a/lash.c	27 Mar 2004 10:02:45 -0000	1.158
+++ b/lash.c	7 Apr 2004 09:34:26 -0000	1.159
@@ -1275,15 +1275,6 @@
 	 */
 	name = child->argv[0];
 
-#ifdef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
-	/* If you enable CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN, then
-	 * if you run /bin/cat, it will use BusyBox cat even if
-	 * /bin/cat exists on the filesystem and is _not_ busybox.
-	 * Some systems want this, others do not.  Choose wisely.  :-)
-	 */
-	name = bb_get_last_path_component(name);
-#endif
-
 	{
 	    char** argv_l=child->argv;
 	    int argc_l;

Index: ash.c
===================================================================
RCS file: /var/cvs/busybox/shell/ash.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- a/ash.c	5 Apr 2004 13:24:07 -0000	1.94
+++ b/ash.c	7 Apr 2004 09:34:26 -0000	1.95
@@ -3717,15 +3717,9 @@
 	int flg_bb = 0;
 	char *name = cmd;
 
-#ifdef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
-	name = bb_get_last_path_component(name);
-	if(find_applet_by_name(name) != NULL)
-		flg_bb = 1;
-#else
 	if(strchr(name, '/') == NULL && find_applet_by_name(name) != NULL) {
 		flg_bb = 1;
 	}
-#endif
 	if(flg_bb) {
 		char **ap;
 		char **new;




More information about the busybox-cvs mailing list