HOME variable in init/init.c
Sean MacLennan
seanm at seanm.ca
Sat Sep 15 16:00:46 UTC 2018
On Sat, 15 Sep 2018 18:36:27 +0300
Asaf Kahlon <asafka7 at gmail.com> wrote:
> I would like to know why HOME was set to "/" at init/init.c (the
> comment above the code just says "Make sure environs is set to
> something sane")? I would expect it to be "/root" considering that
> USER has been set to "root"...
I don't know for sure, but I am guessing it is because busybox is quite
often used in embedded environments. The "/" directory is the only one
that is guaranteed to exist.
Cheers,
Sean
More information about the busybox
mailing list