Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2007 13:02:06 +0000
From:      "Benjamin M. A'Lee" <bma+lists@subvert.org.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Dangers of using a non-base shell
Message-ID:  <20071030130206.GB1178@gilmour.subvert.org.uk>
In-Reply-To: <472647A0.3030009@brookes.ac.uk>
References:  <472647A0.3030009@brookes.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 29, 2007 at 08:50:40PM +0000, Stephen Allen wrote:
> It's been drawn to my attention not to use bash from the ports collection, 
> because if one of it's dependencies (gettext or libiconv) fails or is 
> updated significantly, it could break, and prevent login. The suggested 
> solution was to use a base shell (such as sh) and append 'bash -l' to .shrc 
> to automatically enter bash.
> 
> The quite annoying side-effect is having to type 'exit' twice to get out of 
> a su shell or screen.
> 
> Would it be a better idea to use the pre-compiled binary for bash?  And if 
> I did so, could I be alerted to updates as easy as using 'pkg_version -v' 
> when checking if any ports need updating?

With some of the shells there's the option to compile them statically,
which would avoid the problem. 

You could possibly also put "bash -l && exit" in your .shrc, which would
exit if bash exited successfully. I haven't tested it, but it should
work.

A precompiled binary wouldn't help, AFAIK, because you still wouldn't be
able to use it if there was a problem with one of the libraries.



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