aboutsummaryrefslogtreecommitdiff
path: root/coreutils/chroot.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-08-02 20:56:16 +0000
committerEric Andersen <andersen@codepoet.org>2001-08-02 20:56:16 +0000
commit0b7d70c822ae473b42a9db95cdc026286d992a48 (patch)
tree64e0bd523ef185d3b4ebb1734f7773fa3058606c /coreutils/chroot.c
parent8aa0b62a885e1a0f125e4cd47d993fa7025daf36 (diff)
downloadbusybox-0b7d70c822ae473b42a9db95cdc026286d992a48.tar.gz
Fix up some silly messups with the debian packaging, and a dumb
bug with chroot. I've had the package uploaded but perms set to 000, so I am going to re-tag things and re-cut the release. Folks who pulled from CVS in the last 30 minutes with just have to cope. -Erik
Diffstat (limited to 'coreutils/chroot.c')
-rw-r--r--coreutils/chroot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index f2d9b4d00..0440e46b9 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);