PATH after creating .bashrc

John B Brown jbb at vcn.com
Sun Sep 12 19:08:43 PDT 2010


Dear Folk,

	Wouldn't using .bashrc for it's original purpose be desirable? It was a 
method of removing dangerous abilities from remote users; hence the rc, 
short for remote commands. Isn't .bashrc the place to put the detection 
and restriction of remote access.

	Shalom,

	John B. Brown.
	[jbb at vcn.com]
	358 High Street,
	Buffalo, Wyoming
	82834

"Freedom is not worth having if it does not include
the freedom to make mistakes"  Mahatma Gandhi
"If any question why we died, tell them,
because our fathers lied."  Rudyard Kipling
"A man who does not know the truth is just an idiot
but a man who knows the truth and calls it a lie
is a crook."  Bertolt Brecht
"I wonder whether the world is being run
by smart people who are putting us on
or by imbeciles who really mean it."  Mark Twain

1-307-684-9068

On 9/12/10 11:15 AM, Eckhard Wiemann wrote:
> Ok, it seems that a .bashrc is not required anymore. I added its content to the .profile, removed the .bashrc and .bash_profile, and it works fine.
>
> Thanks to Rainer and Bradley!
>
> Eckhard
>
>
>> On 2010-09-11 19:24 , Eckhard Wiemann wrote:
>>> On my macbook with OS X 10.6.4 there was no .bashrc in my home dir.
>>
>> MacPorts adds to .profile (or if it exists to .bash_profile).
>>
>>> I created it in order to install aliases and added a .bash_profile
>>> with "source ~/.bashrc", because bash did not read the .bashrc after
>>> starting the terminal.
>>
>> .bashrc is not read for login shells. See INVOCATION in the bash man
>> page. This is normal behavior.
>>
>> Also it isn't a good idea to always include the whole .bashrc. For
>> example, any output on stdout would cause protocol violations for scp/sftp.
>>
>> If you really want to keep it in .bashrc and source that from
>> .bash_profile, it is comman to add something like this before doing more
>> stuff which is not required for non-interactive shells:
>>
>> if [[ $- != *i* ]] ; then
>>     # Shell is non-interactive.  Be done now!
>>     return
>> fi
>>
>>> Then the "port"-command did not work anymore. I expanded the
>>> PATH-variable by inserting "/opt/bin" and exported it within the
>>> .bashrc.
>>
>> It should not have been in .bashrc as MacPorts recommends to use
>> .profile (or .bash_profile).
>>
>> http://guide.macports.org/#installing.shell
>> http://trac.macports.org/wiki/InstallingMacPorts#a3.Settheshellenvironment
>>
>> Rainer
>
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>



More information about the macports-users mailing list