diff options
Diffstat (limited to 'chroot.c')
-rw-r--r-- | chroot.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -47,10 +47,15 @@ int chroot_main(int argc, char **argv) | |||
47 | prog = *argv; | 47 | prog = *argv; |
48 | execvp(*argv, argv); | 48 | execvp(*argv, argv); |
49 | } else { | 49 | } else { |
50 | #ifndef BB_SH | ||
50 | prog = getenv("SHELL"); | 51 | prog = getenv("SHELL"); |
51 | if (!prog) | 52 | if (!prog) |
52 | prog = "/bin/sh"; | 53 | prog = "/bin/sh"; |
53 | execlp(prog, prog, NULL); | 54 | execlp(prog, prog, NULL); |
55 | #else | ||
56 | shell_main(argc, argv); | ||
57 | exit (0); | ||
58 | #endif | ||
54 | } | 59 | } |
55 | fatalError("cannot execute %s: %s\n", prog, strerror(errno)); | 60 | fatalError("cannot execute %s: %s\n", prog, strerror(errno)); |
56 | 61 | ||