View previous topic :: View next topic |
Author |
Message |
HelAu n00b
Joined: 09 Feb 2004 Posts: 59
|
Posted: Wed Oct 16, 2013 5:38 pm Post subject: Why is HOME set to / in init scripts |
|
|
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 |
|
|
SlashBeast Retired Dev
Joined: 23 May 2006 Posts: 2922
|
Posted: Wed Oct 16, 2013 6:24 pm Post subject: |
|
|
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 |
|
|
HelAu n00b
Joined: 09 Feb 2004 Posts: 59
|
Posted: Wed Oct 16, 2013 6:44 pm Post subject: |
|
|
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 |
|
|
|