summaryrefslogtreecommitdiff
path: root/coreutils/chroot.c
diff options
context:
space:
mode:
authorPavel Roskin2000-07-24 20:15:30 +0000
committerPavel Roskin2000-07-24 20:15:30 +0000
commite99f7500e0475bcef25f3125efdf847c7382c58f (patch)
tree4752e95bbd3116b181c02e52f71500f952597cf3 /coreutils/chroot.c
parentea824fb9370c41756a75b70698b6222b3386f6c5 (diff)
downloadbusybox-e99f7500e0475bcef25f3125efdf847c7382c58f.zip
busybox-e99f7500e0475bcef25f3125efdf847c7382c58f.tar.gz
chroot can now call the builtin shell
Diffstat (limited to 'coreutils/chroot.c')
-rw-r--r--coreutils/chroot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 9b1a5a8..e8ce539 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -47,10 +47,15 @@ int chroot_main(int argc, char **argv)
prog = *argv;
execvp(*argv, argv);
} else {
+#ifndef BB_SH
prog = getenv("SHELL");
if (!prog)
prog = "/bin/sh";
execlp(prog, prog, NULL);
+#else
+ shell_main(argc, argv);
+ exit (0);
+#endif
}
fatalError("cannot execute %s: %s\n", prog, strerror(errno));