Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.
authorRob Landley <rob@landley.net>
Wed, 14 Jun 2006 01:27:01 +0000 (01:27 -0000)
committerRob Landley <rob@landley.net>
Wed, 14 Jun 2006 01:27:01 +0000 (01:27 -0000)
shell/ash.c
shell/msh.c

index 713898a9f598459fc59f37168df9f522dd0e1c63..a0eb4e36f73309b7c9846725b004292ad1982fc5 100644 (file)
@@ -3737,9 +3737,7 @@ tryexec(char *cmd, char **argv, char **envp)
 #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 */
        }
index 62e6b6e01e1640eac11df651d8ea4228c519c002..bd4b8fdb22bb4a7bdfe33900545ba804849041f5 100644 (file)
@@ -3306,8 +3306,7 @@ char *c, **v, **envp;
                /* 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