Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why is HOME set to / in init scripts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
HelAu
n00b
n00b


Joined: 09 Feb 2004
Posts: 59

PostPosted: Wed Oct 16, 2013 5:38 pm    Post subject: Why is HOME set to / in init scripts Reply with quote

Hi
I realized that every init script which is started by boot runlevel (maybe even all other bootscripts) has set
HOME=/
Whats to do to have this set to /root ?
I want to change this globally not only for my own init scripts
Thanks for any hints
Helmut
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Wed Oct 16, 2013 6:24 pm    Post subject: Reply with quote

HOME is set on login and when you booting, parent process is init, there was no login shell so HOME is unset or set to /, You may set HOME in /etc/rc.conf (should work), setting HOME=/root in kernel's boot params (init should inherit it), or setting it in the very init script that require it in your usecase.
Back to top
View user's profile Send private message
HelAu
n00b
n00b


Joined: 09 Feb 2004
Posts: 59

PostPosted: Wed Oct 16, 2013 6:44 pm    Post subject: Reply with quote

Thanks, I prefer the kernel boot parm, its working fine !
Anyway from my point of view its a strange thing that the variable HOME is set to /, the active user is root so HOME should be set to /root or it could be unset, but set to / is imho not a good idea ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum