Added support for being a login shell, so things like '-su' or '-sh' (stuff
where argv[0][0]=='-') will now always invoke the shell. Now you can use BusyBox as a login shell. -Erik
This commit is contained in:
parent
2e1148b239
commit
5d41d60f1e
@ -12,6 +12,9 @@
|
||||
Fix thanks to Arne Bernin <arne@matrix.loopback.org>
|
||||
* Added support for "sh -c command args...", thanks to
|
||||
Marius Groeger <mgroeger@sysgo.de>
|
||||
* Added support for being a login shell, so things like
|
||||
'-su' or '-sh' (stuff where argv[0][0]=='-') will now always
|
||||
invoke the shell. Now you can use BusyBox as a login shell.
|
||||
|
||||
-Erik Andersen
|
||||
|
||||
|
@ -479,6 +479,13 @@ int main(int argc, char **argv)
|
||||
|
||||
*argv = name;
|
||||
|
||||
#ifdef BB_SH
|
||||
/* Add in a special case hack -- whenever **argv == '-'
|
||||
* (i.e. '-su' or '-sh') always invoke the shell */
|
||||
if (**argv == '-')
|
||||
exit(((*(shell_main)) (argc, argv)));
|
||||
#endif
|
||||
|
||||
while (a->name != 0) {
|
||||
if (strcmp(name, a->name) == 0) {
|
||||
exit(((*(a->main)) (argc, argv)));
|
||||
|
@ -479,6 +479,13 @@ int main(int argc, char **argv)
|
||||
|
||||
*argv = name;
|
||||
|
||||
#ifdef BB_SH
|
||||
/* Add in a special case hack -- whenever **argv == '-'
|
||||
* (i.e. '-su' or '-sh') always invoke the shell */
|
||||
if (**argv == '-')
|
||||
exit(((*(shell_main)) (argc, argv)));
|
||||
#endif
|
||||
|
||||
while (a->name != 0) {
|
||||
if (strcmp(name, a->name) == 0) {
|
||||
exit(((*(a->main)) (argc, argv)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user