svn commit: trunk/busybox/shell

landley at busybox.net landley at busybox.net
Wed Jun 14 01:27:05 UTC 2006


Author: landley
Date: 2006-06-13 18:27:01 -0700 (Tue, 13 Jun 2006)
New Revision: 15381

Log:
Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.


Modified:
   trunk/busybox/shell/ash.c
   trunk/busybox/shell/msh.c


Changeset:
Modified: trunk/busybox/shell/ash.c
===================================================================
--- trunk/busybox/shell/ash.c	2006-06-14 01:24:33 UTC (rev 15380)
+++ trunk/busybox/shell/ash.c	2006-06-14 01:27:01 UTC (rev 15381)
@@ -3737,9 +3737,7 @@
 #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
 	if(find_applet_by_name(cmd) != NULL) {
 		/* re-exec ourselves with the new arguments */
-		execve("/proc/self/exe",argv,envp);
-		/* If proc isn't mounted, try hardcoded path to busybox binary*/
-		execve("/bin/busybox",argv,envp);
+		execve(CONFIG_BUSYBOX_EXEC_PATH,argv,envp);
 		/* If they called chroot or otherwise made the binary no longer
 		 * executable, fall through */
 	}

Modified: trunk/busybox/shell/msh.c
===================================================================
--- trunk/busybox/shell/msh.c	2006-06-14 01:24:33 UTC (rev 15380)
+++ trunk/busybox/shell/msh.c	2006-06-14 01:27:01 UTC (rev 15381)
@@ -3306,8 +3306,7 @@
 		/* We have to exec here since we vforked.  Running
 		 * run_applet_by_name() won't work and bad things
 		 * will happen. */
-		execve("/proc/self/exe", v, envp);
-		execve("busybox", v, envp);
+		execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
 	}
 #endif
 




More information about the busybox-cvs mailing list