I have run into an issue when executing script in /etc/profile.d/script.sh. On one of my machines (only this one, on the others it is running well), when I do
echo "$BASH_VERSION" >> /home/synek317/log
echo "$SHELL" >> /home/synek317/log
the result is that BASH_VERSION is empty, but SHELL is /bin/bash. However, when I run terminal and type echo $BASH_VERSION, it is filled correctly.
I run this on Ubuntu 16.04.1.
Do you have any ideas why is this variable empty during execution of /etc/profile.d/ scripts?
By definition, /etc/profile.d scripts are not run by Bash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With