[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: /sbin/init overrides HOME and TERM env vars
From:       Stefan Seyfried <stefan.seyfried () googlemail ! com>
Date:       2022-03-12 12:00:15
Message-ID: fb9b8e02-cf62-2496-416b-2cf54d222dda () message-id ! googlemail ! com
[Download RAW message or body]

On 12.03.22 11:19, jkm wrote:
> Dear Stefan
> 
>> 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.

Ok, then I was reading the kernel code wrong ;-)

> 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=/");

I guessed it was some (old) compatibility stuff, reaching back to 
kernels 0.99.x when HOME and TERM might not have been set by the kernel 
already ;-)

>> Did you check if you can actually set this to something else?
> 
> Yes, I did.

Then I'll shut up now :-)
-- 
Stefan Seyfried

"For a successful technology, reality must take precedence over
  public relations, for nature cannot be fooled." -- Richard Feynman
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic