bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash usage w/ssh question (re: suse10.2)


From: Linda Walsh
Subject: bash usage w/ssh question (re: suse10.2)
Date: Thu, 22 Feb 2007 17:36:10 -0800
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

I have an odd usage question which may or may not be within the scope of this list. Background: in installing a system with suse10.2, I noticed my .bashrc effectively getting run twice when I use "ssh" to run a remote command
(no interactive login).

The seems to be due to a change in SuSE's "/etc/bash.bashrc" doing
a bit extra (sourcing /etc/profile) on non-interactive logins as
the SuSE way to set system-specific variables.

*** The thing is, I'm not sure "who" is calling "/etc/bash.bashrc".
Is it part of some standard I am not aware of?

It doesn't appear to be called out of any ssh-rc script, so I'm
not sure why it is getting run in the first place, but because it
is run, it now calls profile which ends up calling my own variable
definitions (declared read-only), twice - because my variable
defines don't expect to be called from both "/etc/profile" and
from "~/.bashrc" in the same session.

Another question (maybe a budding RFE?) is: Is there a way to find
out (and print the "source stack" -- i.e. nested "calls" using
"." to source files that are sourcing more...etc.  I know it isn't
technically a procedure call, but there is a concept of a call
stack in  that a sourced file is performed as though inserted in
the current routine, then control resumes at the first line after
the source.
Semantically -- it isn't a "call stack", but more akin to the actions
of a "preprocessor", but "syntactically", it functions much like
file a calls(sources) b, b calls(sources) c... etc...

Thanks,
Linda






reply via email to

[Prev in Thread] Current Thread [Next in Thread]