Scripts in the '/etc/profile.d/' directory
| Newsgroups | gmane.linux.lfs.beyond.devel |
|---|---|
| Message-ID | <CAOW_YOmxzBJvtDPEu02e_SNd=4SjD-a1qaHJqhGd_cNsumz-BQ@mail.gmail.com> |
Hi all.
= = = Transcription begins = = =
for script in /etc/profile.d/*.sh ; do
if [ -r $script ] ; then
. $script
fi
done
unset script
= = = Transcription ends = = =
I realized that the piece of code above _is_ loaded when a user logs
in the system (the 'login shell' reads the '/etc/profile' file).
However, when an user instantiates a 'non login shell' (e.g. GNU
Screen is run), that piece of code is _not_ loaded and so missing
essential configurations.
My suggestion would be to copy that piece of code into the
'/etc/bashrc' file too, so having it in the two files '/etc/profile'
and '/etc/bashrc'.
Maybe there is a more 'elegant' solution.
To your decision
Jamenson Ferreira Espindula de Almeida Melo
Jaboatão dos Guararapes, Pernambuco, Brazil
GNU/Linux user #166197; LFS ID 24492
Key fingerprint: 234D 1914 4224 7C53 BD13 6855 2AE0 25C0 08A8 6180
--
http://lists.linuxfromscratch.org/sympa/info/blfs-dev
Unsubscribe: See the above information page