summaryrefslogtreecommitdiff
path: root/chroot.c
diff options
context:
space:
mode:
authorEric Andersen2001-08-02 20:56:16 +0000
committerEric Andersen2001-08-02 20:56:16 +0000
commit0b7d70c822ae473b42a9db95cdc026286d992a48 (patch)
tree64e0bd523ef185d3b4ebb1734f7773fa3058606c /chroot.c
parent8aa0b62a885e1a0f125e4cd47d993fa7025daf36 (diff)
downloadbusybox-0b7d70c822ae473b42a9db95cdc026286d992a48.zip
busybox-0b7d70c822ae473b42a9db95cdc026286d992a48.tar.gz
Fix up some silly messups with the debian packaging, and a dumb0_60_0
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 'chroot.c')
-rw-r--r--chroot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/chroot.c b/chroot.c
index f2d9b4d..0440e46 100644
--- a/chroot.c
+++ b/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);