aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorGravatar Rob Landley <rob@landley.net>2006-06-14 01:27:01 +0000
committerGravatar Rob Landley <rob@landley.net>2006-06-14 01:27:01 +0000
commita34b48abe511b0e469d8b74f99902cc4df45d93d (patch)
treeaf3980cb1fc3ddea246f93d32d5d9f1dcb436b49 /shell
parentc7ddefc0624173de6b74ee5b5b39cb2d354f5ae6 (diff)
downloadbusybox-a34b48abe511b0e469d8b74f99902cc4df45d93d.tar.gz
busybox-a34b48abe511b0e469d8b74f99902cc4df45d93d.tar.bz2
Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
-rw-r--r--shell/msh.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 713898a9f..a0eb4e36f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -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 */
}
diff --git a/shell/msh.c b/shell/msh.c
index 62e6b6e01..bd4b8fdb2 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -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