chroot can now call the builtin shell
This commit is contained in:
parent
ea824fb937
commit
e99f7500e0
@ -1,5 +1,6 @@
|
|||||||
0.47pre
|
0.47pre
|
||||||
|
|
||||||
|
* chroot can now call the builtin shell - Pavel Roskin <proski@gnu.org>
|
||||||
* added 'renice' command -- thanks to Dave Cinege <dcinege@psychosis.com>
|
* added 'renice' command -- thanks to Dave Cinege <dcinege@psychosis.com>
|
||||||
* 'make install' now creates relative symlinks, and added a new
|
* 'make install' now creates relative symlinks, and added a new
|
||||||
'make install-hardlinks' target to (tada) install hardlinks.
|
'make install-hardlinks' target to (tada) install hardlinks.
|
||||||
|
5
chroot.c
5
chroot.c
@ -47,10 +47,15 @@ int chroot_main(int argc, char **argv)
|
|||||||
prog = *argv;
|
prog = *argv;
|
||||||
execvp(*argv, argv);
|
execvp(*argv, argv);
|
||||||
} else {
|
} else {
|
||||||
|
#ifndef BB_SH
|
||||||
prog = getenv("SHELL");
|
prog = getenv("SHELL");
|
||||||
if (!prog)
|
if (!prog)
|
||||||
prog = "/bin/sh";
|
prog = "/bin/sh";
|
||||||
execlp(prog, prog, NULL);
|
execlp(prog, prog, NULL);
|
||||||
|
#else
|
||||||
|
shell_main(argc, argv);
|
||||||
|
exit (0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
fatalError("cannot execute %s: %s\n", prog, strerror(errno));
|
fatalError("cannot execute %s: %s\n", prog, strerror(errno));
|
||||||
|
|
||||||
|
@ -47,10 +47,15 @@ int chroot_main(int argc, char **argv)
|
|||||||
prog = *argv;
|
prog = *argv;
|
||||||
execvp(*argv, argv);
|
execvp(*argv, argv);
|
||||||
} else {
|
} else {
|
||||||
|
#ifndef BB_SH
|
||||||
prog = getenv("SHELL");
|
prog = getenv("SHELL");
|
||||||
if (!prog)
|
if (!prog)
|
||||||
prog = "/bin/sh";
|
prog = "/bin/sh";
|
||||||
execlp(prog, prog, NULL);
|
execlp(prog, prog, NULL);
|
||||||
|
#else
|
||||||
|
shell_main(argc, argv);
|
||||||
|
exit (0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
fatalError("cannot execute %s: %s\n", prog, strerror(errno));
|
fatalError("cannot execute %s: %s\n", prog, strerror(errno));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user