Run $SHELL on terminal startup instead of hard-coded /bin/sh
This commit is contained in:
parent
9cc5ddd0e9
commit
a0a6ece24d
@ -699,7 +699,9 @@ int main(int argc, char ** argv) {
|
||||
char * tokens[] = {"/bin/login",NULL};
|
||||
int i = execvp(tokens[0], tokens);
|
||||
} else {
|
||||
char * tokens[] = {"/bin/sh",NULL};
|
||||
char * shell = getenv("SHELL");
|
||||
if (!shell) shell = "/bin/sh"; /* fallback */
|
||||
char * tokens[] = {shell,NULL};
|
||||
int i = execvp(tokens[0], tokens);
|
||||
}
|
||||
}
|
||||
|
@ -1311,7 +1311,9 @@ int main(int argc, char ** argv) {
|
||||
char * tokens[] = {"/bin/login",NULL};
|
||||
int i = execvp(tokens[0], tokens);
|
||||
} else {
|
||||
char * tokens[] = {"/bin/sh",NULL};
|
||||
char * shell = getenv("SHELL");
|
||||
if (!shell) shell = "/bin/sh"; /* fallback */
|
||||
char * tokens[] = {shell,NULL};
|
||||
int i = execvp(tokens[0], tokens);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user