/sbin/init overrides HOME and TERM env vars
Denys Vlasenko
vda.linux at googlemail.com
Mon May 2 12:48:53 UTC 2022
On Sat, Mar 12, 2022 at 11:20 AM jkm <8192 at wp.pl> wrote:
> > Looking at the kernel code in init/main.c, it does look like HOME=/
> > TERM=linux is hard coded in the kernel with no way to override this from
> > the command line.
>
> I guess you are wrong.
> HOME and TERM env vars can be overriden with boot params.
>
> Anyway, if HOME=/ is hardcoded in the kernel then what is the reason for
> setting it in init command for the second time?
>
> putenv((char *) "HOME=/");
>
> > Did you check if you can actually set this to something else?
>
> Yes, I did.
I removed setting of HOME="/" from init.
More information about the busybox
mailing list