helpThe GNU Bourne-Again SHell - Support: sr #108737, bash initialization, in...


sr #108737: bash initialization, in unconditional mode at system level

Submitted by:  None
Submitted on:  Sat 31 Jan 2015 03:12:47 AM UTC  
Category:  None Priority:  5 - Normal
Severity:  4 - Important Status:  Wont Do
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 25 Mar 2015 09:43:00 AM UTC, comment #1:

The referenced patch has more to do with rejecting the distro provided bashrc, and not really to provide a unified rcfile.

The issue is solved easily, and you don't really have to patch bash, you just need to:

- Provide users with template .bashrc/.profile files.
- Said template files should do the following: .profile sources .bashrc if bash is detected. .bashrc setups the shell and possibly sources global rcfiles that you determine convenient.

So, that'd look like this:

$ cat ~/.profile
if [[ $BASH_VERSION && -r $HOME/.bashrc ]]; then . ~/.bashrc; fi
$ cat ~/.bashrc
alias blah=bleh
[[ -r /etc/hpc/bashrc ]] && . /etc/hpc/bashrc

There's no need to patch bash

Eduardo Bustamante <dualbus>
Sat 31 Jan 2015 03:12:47 AM UTC, original submission:


I suspect this has been discussed several times, so perhaps I'm missing some pointers;

As you may notice here, initialisation of bash is not generic across all invocation modes:
This sends users cursing over hours about how the startup configurations function.

fi. If we wished to modify variable $SCRATCH under all circumstances, there is no single perfect way to do this. Question:

  • Is it possible/allowed to have a file /etc/bash.hpc which gets sourced in all cases?

The name of the file could be anything (/etc/hpc/bashrc or whatever); what matters is to have at least some hook that works reliably across distros and login modes. People on High Performance Computing platforms have been suffering a lot by this issue and each HPC site provides its own kind of workarounds. One more example:

So, your propositions/suggestions?

If anyone of you is at FOSDEM'15, kindly inform to interact a bit faster on the topic.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chet (Updated the item)
  • -email is unavailable- added by dualbus (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-13 chet StatusNone => Wont Do

    Back to the top

    Powered by Savane 3.3