Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Aug 2001 12:47:01 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        Kris Kennaway <kris@obsecurity.org>, Jason Vervlied <jvervlied@hway.net>, freebsd-current@FreeBSD.ORG
Subject:   Re: bash in /usr/local/bin?
Message-ID:  <3B758BB5.D529AA5F@mindspring.com>
References:  <3B74D180.D036D629@hway.net> <20010810233635.A12077@xor.obsecurity.org> <p0510100fb79b2a85857c@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
Garance A Drosihn wrote:
> 
> At 11:36 PM -0700 8/10/01, Kris Kennaway wrote:
> >On Sat, Aug 11, 2001, Jason Vervlied wrote:
> >  > Is there a reason why the bash shell is kept in /usr/local/bin.
> >
> >Ports get installed under ${PREFIX} (/usr/local by default).
> >
> >  > I would personally prefer to use it for my root shell, but
> >  > if I remember right, root needs to have something that is
> >  > in /bin (I could be wrong).
> >
> >You are wrong.
> 
> ..  And you ARE the weakest link!                         :-)
> 
> Seriously though, it would be mighty prudent to have the shell
> for userid root to be in some directory which is part of the
> root filesystem.  I suspect that very few people keep /usr/local
> in their root filesystem.  So, while a shell doesn't need to be
> in /bin per se, that IS a pretty popular place to put any shell
> which someone expects to use as the default for userid root.
> 
> As to Jason's situation, I also like to use bash as my shell
> even when I am root.  However, I do not want to muck around with
> the port for 'bash', or do anything else to move where bash is
> or how it's built.  So, the way I decided to handle it was to
> add the following lines in the /root/.login  file:
> 
> if ( -x /usr/local/bin/bash ) then
>     # echo "Switching to bash"
>     exec /usr/local/bin/bash -login
> endif
> 
> So, strictly speaking /bin/csh is still the default shell for
> root, but the effect for me is that I automatically get bash
> whenever I log in.  This seems to work fine for me, and I am
> not aware of any problems which have been caused by this trick
> in the few years that I have been using it.

Add "setenv SHELL /usr/local/bin/bash", and only do your trick
in the initial interactive login shell, and your logins will
be faster, and you will get the "right" (for those definitions
of "right" which include intentional use of "bash" 8-)) shell
when you shell out of "vi" or other programs.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B758BB5.D529AA5F>