----- Original Message -----
From: "Siteshwar Vashisht" <svashisht(a)redhat.com>
To: devel(a)lists.fedoraproject.org
Sent: Tuesday, May 2, 2017 3:42:14 PM
Subject: RFC: Always sourcing /etc/bashrc for interactive mode in bash
We are discussing about always sourcing /etc/bashrc for interactive mode in
bug 1193590 [1]. Currently /etc/bashrc is sourced by user's bashrc script
and if a user forgets to source it, some of the default configurations will
not be set (for e.g. see bug 1390780 [2]). I am pondering over the idea to
source /etc/bashrc by default (see commmit at [3]) and fix current
/etc/bashrc script to avoid double sourcing [4]. This change may cause
undesirable effects if a custom /etc/bashrc is prone to double sourcing and
might break some systems. Any comments about this change are welcome.
This breaks some use cases as it modifies order of sourcing of /etc/bashrc file. Due to
this change /etc/bashrc gets sourced before user's ~/.bashrc and there is no way to
set configurations before /etc/bashrc is sourced (See comment here[1]). It looks like
making this work will possibly require significant refactoring of startup scripts in
fedora (that might cause some compatbility issues). The scripts under /etc/profile.d are
sourced by /etc/profile for login shells and by /etc/bashrc for non-login shells.
Refactoring the startup scripts will lead to a more cleaner solution, however it may also
break existing setups.
[1]
https://bugzilla.redhat.com/show_bug.cgi?id=1193590#c40
--
--
Siteshwar Vashisht