diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/chroot.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c index f2d9b4d..0440e46 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c @@ -48,17 +48,17 @@ 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 +#if defined(BB_SH) && defined BB_FEATURE_SH_STANDALONE_SHELL char shell[] = "/bin/sh"; char *shell_argv[2] = { shell, NULL }; applet_name = shell; shell_main(1, shell_argv); return EXIT_SUCCESS; +#else + prog = getenv("SHELL"); + if (!prog) + prog = "/bin/sh"; + execlp(prog, prog, NULL); #endif } perror_msg_and_die("cannot execute %s", prog); |