Userspace: Set SHELL environment variable in init instead of shell
This commit is contained in:
parent
26d6bf338e
commit
ab9a6d583b
|
@ -819,9 +819,6 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc >= 1)
|
|
||||||
setenv("SHELL", argv[0], true);
|
|
||||||
|
|
||||||
source_shellrc();
|
source_shellrc();
|
||||||
|
|
||||||
new_termios = old_termios;
|
new_termios = old_termios;
|
||||||
|
|
|
@ -114,6 +114,7 @@ int main()
|
||||||
setenv("HOME", pwd->pw_dir, 1);
|
setenv("HOME", pwd->pw_dir, 1);
|
||||||
chdir(pwd->pw_dir);
|
chdir(pwd->pw_dir);
|
||||||
|
|
||||||
|
setenv("SHELL", pwd->pw_shell, 1);
|
||||||
char shell_path[PATH_MAX];
|
char shell_path[PATH_MAX];
|
||||||
strcpy(shell_path, pwd->pw_shell);
|
strcpy(shell_path, pwd->pw_shell);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue