[NTLUG:Discuss] Re: Debian/SuSE /etc/bash.bashrc -- WAS: SuSE Linux 103 Exam
Bryan J. Smith
b.j.smith at ieee.org
Tue Jul 20 14:25:11 CDT 2004
Chris Cox wrote:
> I don't know.. I think you could have answered
> A,C correctly on the bash question. I would
> have eliminated D for the reason you gave, but
> your statements about C are just wrong (well,
> it's a Red Hat-ish comment... but still wrong).
On all the SuSE Linux Standard/Enterprise Server 8 systems
I've supported, the docs state that /etc/bash.bashrc should only
have aliases and functions go in there.
It would be different if the question just said "environment."
But it said "environment variables." I distinctly remember the
word "variables" _verbatim_.
Yes, SuSE likes to use ~/.profile instead of ~/.bash_profile
like Red Hat. I covered this in my pre-administration training
courses (along with Debian differences as well).
But the system-wide environmental _variables_ go in /etc/profile.
The system-wide aliases and functions go in /etc/[bash.]bashrc.
Again, why? Even on SuSE, things in /etc/bash.bashrc do _not_
get passed onto subshells. It's not "system-wide" by design,
that's why you don't use it for variables.
I might prefer Red Hat, but I keep myself abridged of _all_ the
major differences. I maintain login scripts that handle several
distribution flavors and their quirks (along with Solaris and
Irix) -- _especially_ Debian (including Xandros) _and_ SuSE.
> B is VERY wrong.. but it's obvious you have Red Hat leanings.
I said it was _wrong_ for SuSE, yes.
I eliminated "B" based on that, because it is Red Hat's equivalent.
Or are you just agreeing with me?
> If you look close enough you'll see why it's the wrong
> answer even on Red Hat since it assumes the Red Hat user
> has not modified his local ~/.bashrc.
Actually, in Red Hat, the ~/.bashrc calls /etc/bashrc.
I am _very_familar_ with how the system/user bashrc set
works across Debian, Red Hat and SuSE. ;-ppp
> Btw.. that Red Hat behavior has changed over time, so
> if you don't see your ~/.bashrc trying to pull in
> /etc/bashrc.. don't fret. You can add it if you want
> since it is your local profile.
Correct.
But I'm not even talking that. I'm talking about the behavior
of SuSE's /etc/bash.bashrc.
It was clear to me that the test writer _might_ have though variables set
in /etc/bash.bashrc would be passed to subshells, but they are _not_.
At the same time, I though the test writer _might_ be testing to see
if *I* knew that they would not be, and that's why he/she _specically_
said "environment variables" and not just "environment."
So in the end, he gave me a question that had "no best answer."
I picked the answer that worked for variables to _all_ subshells,
and that was (D) /etc/SuSEconfig/profile alongside (A) /etc/profile.
Again, the word "variables" was key.
It shows that test exam really need a beta, at least in the US
(if it has one in Germany).
Debian works similarly as well for it's /etc/bash.bashrc.
As we discussed, Red Hat calls it /etc/bashrc, so B was wrong aswell.
--
Linux Enthusiasts call me anti-Linux.
Windows Enthusisats call me anti-Microsoft.
They both must be correct because I have over a
decade of experience with both in mission critical
environments, resulting in a bigotry dedicated to
mitigating risk and focusing on technologies ...
not products or vendors
--------------------------------------------------
Bryan J. Smith, E.I. b.j.smith at ieee.org
More information about the Discuss
mailing list