https://bugzilla.novell.com/show_bug.cgi?id=244788 Summary: bashrc incorrectly calls login profile Product: openSUSE 10.2 Version: Final Platform: i686 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: suse@tlinx.org QAContact: qa@suse.de "profile" and "profile.d" are for login scripts run for interactive sessions "bashrc" is run on each bash invocation in 10.2 someone added code in /etc/bash.bashrc to call the login /etc/profile This is not correct usage. Code added (and comment): # # Just in case the user excutes a command with ssh # if test -n "$SSH_CLIENT" -a -z "$PROFILEREAD" ; then . /etc/profile > /dev/null 2>&1 fi ----- Note, this wouldn't get called with "rsh" (assuming someone used it; but it does get called on "scp" and "rsync" (assuming one uses 'ssh as transfer method'); just as .bashrc is reserved for per-bash invokes, so, by its name should be /etc/bash.bashrc --the problem is that /etc/bash.bashrc calls the user's locally defined bashrc.local -- As per bash documentation, I do interactive initializations in my "profile" and do per-invok initializations in bashrc (which means "profile" calls bashrc, but bashrc doesn't call profile); interactive invocations do things like set tty values and unicode terminal values. These are things that don't work correctly unless a tty has been allocated (as in an interactive login). bashrc needs to be kept for non-interactive login initializations -- and NOT call "profile" (which is reserved for activating tty sessions that record logins in 'last'). Please don't mix these conventions...I know someone thought they were helping, but in my case, it ended up calling my 'login' initializations twice. I specifically DO NOT check for my login script being called twice because it "should" only be called once (whereas my bashrc does check for duplicate/recursive calls, as it may be called more than once). Thanks, Linda -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.