Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bash package in default-bash-and-zsh ppa with /etc/bash.bashrc support #22

Open
clarkead opened this issue Sep 27, 2023 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@clarkead
Copy link

On Ubuntu, while using nhi after following the install procedures outlined in the README.md, I noticed that my system-wide /etc/bash.bashrc was not getting sourced into my interactive shells (it still worked with login shells as /etc/profile loads the /etc/bash.bashrc). After digging into the issue, it seems like the issue starts after reinstalling the bash package from ppa:strang1ato/default-bash-and-zsh. After some Googling it looks like the issue might be due to a missing option (-DSYS_BASHRC) when bash is being compiled.

Simplified steps to reproduce on a clean Ubuntu 22.04 instance...

# ssh to the instance

sudo apt update
sudo apt upgrade
sudo bash -c 'echo "echo \"Hit: /etc/bash.bashrc\"" >> /etc/bash.bashrc'
echo "echo \"Hit: ~/.bashrc\"" >> ~/.bashrc

# exit and ssh back in to the instance, note you get two echos

bash

# note you get two echos

# next we will exit the interactive shell and go back to the login shell from ssh
exit

sudo apt remove zsh-common
sudo add-apt-repository ppa:strang1ato/default-bash-and-zsh
sudo apt update
sudo apt install --reinstall bash

# exit and ssh back in to the instance, note you get two echos

bash

# note you only get one echo

Thank you for this project and work!

@strang1ato strang1ato added bug Something isn't working enhancement New feature or request labels Sep 28, 2023
@strang1ato
Copy link
Owner

Thank you for comprehensive report of the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants