Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#10073 - Fix .bashrc file in /etc/skel directory (bash package)

Attached to Project: Arch Linux
Opened by Alexander Drozdov (adrozdov) - Friday, 04 April 2008, 01:00 GMT
Last edited by Aaron Griffin (phrakture) - Monday, 02 February 2009, 21:45 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture All
Severity Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
If user put some ouput (like 'echo Hello!' or 'celebrat' for output every time when BASH is started) into ~/.bashrc file some non-interactive operations can be fail.

For ex., my .bashrc file:
---- cut here ----
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '

test -n "$DISPLAY" && export TERM=xterm-color

export PATH=$PATH:~/bin

export EDITOR=vim

# Output dates
echo
celebrat
echo
---- cut here ----

And if I try to copy file from another computer via 'scp' it fail: scp ask me for password but after Enter-press I see two new line on screen and info from celebrat. Solution for fixing this issue (from Debian Etch): add next lines:
---- cut here ----
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
---- cut here ----
at the begin of .bashrc so... For new users it line should be placed into skel data and /etc/skel/.bashrc should be fixed.

Additional info:
* package version(s): bash 3.2.033-2
* config and/or log files etc:


Steps to reproduce:
1. install bash and openssh
2. create new user (alex, for ex.) and set bash as user-shell
3. add 'echo Hi Alex' to end of ~/.bashrc
4. start openssh daemon (/etc/rc.d/sshd start)
5. log in to anther computer and try to copy some file via scp to user alex:
scp some_file.txt alex@test_host:
EXPECTED RESULT: file copied
ACTUAL RESULT: 'Hi Alex' text is shown on screen, file is not copied.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Monday, 02 February 2009, 21:45 GMT
Reason for closing:  Implemented
Comment by Paul Bredbury (brebs) - Friday, 04 April 2008, 11:26 GMT
Gentoo uses:

if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
Comment by Gavin Bisesi (Daenyth) - Wednesday, 04 June 2008, 18:50 GMT
Fix is still not present as of 3.2.033-2.
Comment by Aaron Griffin (phrakture) - Wednesday, 04 June 2008, 19:10 GMT
  • Field changed: Task Type (Bug Report → Feature Request)
Switching to a FR because this is not a bug. If you're editing a file and adding output to it, do a little research and do it right.
Comment by Gavin Bisesi (Daenyth) - Sunday, 07 December 2008, 03:43 GMT
What's the status on this?
Comment by Alexander Drozdov (adrozdov) - Sunday, 07 December 2008, 05:00 GMT
I don't observer changes in skel currently...
Comment by Aaron Griffin (phrakture) - Tuesday, 09 December 2008, 00:01 GMT
  • Field changed: Status (Assigned → Waiting on Response)
Please test bash 3.2.048 when it hits the repos
Comment by Greg (dolby) - Monday, 02 February 2009, 02:21 GMT
Is this implemented?

Loading...