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

SSH Login Dietpi | Banner is displayed four times #2529

Closed
jonare77 opened this issue Feb 10, 2019 · 4 comments
Closed

SSH Login Dietpi | Banner is displayed four times #2529

jonare77 opened this issue Feb 10, 2019 · 4 comments
Assignees
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Milestone

Comments

@jonare77
Copy link

jonare77 commented Feb 10, 2019

Solution/Fix: https://github.com/Fourdee/DietPi/issues/2529#issuecomment-462138314


Creating a bug report/issue

Required Information

  • DietPi version | G_DIETPI_VERSION_CORE=6, G_DIETPI_VERSION_SUB=21, G_DIETPI_VERSION_RC=1, G_GITBRANCH=master, G_GITOWNER=Fourdee
  • Distro version | Distro version | 9.7
  • Kernel version | uname -a
  • SBC device | Kernel version | Linux DietPi 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
    SBC device | Virtual Machine (x86_64)

Additional Information (if applicable)

  • Was the software title installed freshly or updated/migrated: Freshly
  • Can this issue be replicated on a fresh installation of DietPi?: Not sure
  • dietpi-bugreport ID | 9b1ac4a2-8c3b-4d4c-a6b4-fa83e8a54b2b

Steps to reproduce

  1. Login with SSH (user: dietpi)

Expected behaviour

  • When login, Dietpi banner/Info should be displayed one time

Actual behaviour

  • When login, Dietpi banner/Info is displayed four times

Extra details

  • Tried SecureCRT 8.5.2 and Putty 7.0
@Fourdee
Copy link
Collaborator

Fourdee commented Feb 10, 2019

@jonare77

Many thanks for the report 👍

Not something I've seen in local testing, however, i'll check your bug report and see what the cause is.

@Fourdee Fourdee added this to the v6.22 milestone Feb 10, 2019
@Fourdee Fourdee self-assigned this Feb 10, 2019
@Fourdee
Copy link
Collaborator

Fourdee commented Feb 10, 2019

@jonare77

Found the cause, 4 entries for bashrc.d in /etc/bash.bashrc:

for i in /etc/bashrc\.d/*.sh; do [ -r "$i" ] && . $i; done
for i in /etc/bashrc\.d/*.sh; do [ -r "$i" ] && . $i; done
for i in /etc/bashrc\.d/*.sh; do [ -r "$i" ] && . $i; done
for i in /etc/bashrc\.d/*.sh; do [ -r "$i" ] && . $i; done

Solution/fix for multiple entries (copy + paste all into SSH):

sed -i '\#for i in /etc/bashrc#d' /etc/bash.bashrc
G_CONFIG_INJECT '.*/etc/bashrc\.d/.*' 'for i in /etc/bashrc.d/*.sh; do [ -r "$i" ] && . $i; done' /etc/bash.bashrc

@Fourdee
Copy link
Collaborator

Fourdee commented Feb 10, 2019

Although unable to replicate in local testing, will patch clean + re-apply v6.22, no harm.

@Fourdee Fourdee added Bug 🐞 Solution available 🥂 Definite solution has been done and removed Investigating 🤔 labels Feb 10, 2019
Fourdee referenced this issue Feb 10, 2019
General | Resolved an issue where /etc/bashrc.d entries could be run multiple times: https://github.com/Fourdee/DietPi/issues/2529
@Fourdee
Copy link
Collaborator

Fourdee commented Feb 10, 2019

Completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

2 participants