I have a script from a commercial software that sets the according variables to run the software. If I source that script from an interactive shell everything is fine. However, I would like to source that script during boot time. So, I added
Code:
if [ -f /that/script ]; then
. /that/script
fi
to /etc/rc.d/rc.local. If I boot the machine, I can see that the script gets run and all the variables get set. However, in the interactive shell running in the tty those variables are not set anymore. I assume that the interactive shells are not a child of the shell that was run by init so it makes sense thate the variables are gone.
So, how can I run a script from rc.local and keep the variables it has set?