From e99f7500e0475bcef25f3125efdf847c7382c58f Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Mon, 24 Jul 2000 20:15:30 +0000 Subject: chroot can now call the builtin shell --- coreutils/chroot.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'coreutils') diff --git a/coreutils/chroot.c b/coreutils/chroot.c index 9b1a5a82d..e8ce53973 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)); -- cgit v1.2.3