From owner-freebsd-questions@FreeBSD.ORG Tue Oct 30 15:05:07 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE85B16A417 for ; Tue, 30 Oct 2007 15:05:07 +0000 (UTC) (envelope-from freebsd-questions@slightlystrange.org) Received: from catflap.slightlystrange.org (cpc5-cmbg1-0-0-cust497.cmbg.cable.ntl.com [86.6.1.242]) by mx1.freebsd.org (Postfix) with ESMTP id 834C513C4B2 for ; Tue, 30 Oct 2007 15:05:07 +0000 (UTC) (envelope-from freebsd-questions@slightlystrange.org) Received: by catflap.slightlystrange.org (Postfix, from userid 106) id 87A9E614E; Tue, 30 Oct 2007 15:05:06 +0000 (GMT) Received: from torus.slightlystrange.org (torus.slightlystrange.org [10.1.3.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by catflap.slightlystrange.org (Postfix) with ESMTP id E3CF06132 for ; Tue, 30 Oct 2007 15:05:05 +0000 (GMT) Received: (from danielby@localhost) by torus.slightlystrange.org (8.13.8/8.13.4/Submit) id l9UF546c052988 for freebsd-questions@freebsd.org; Tue, 30 Oct 2007 15:05:04 GMT (envelope-from freebsd-questions@slightlystrange.org) Date: Tue, 30 Oct 2007 15:05:04 +0000 From: Daniel Bye To: FreeBSD Questions Message-ID: <20071030150504.GD82329@brick.slightlystrange.org> Mail-Followup-To: FreeBSD Questions References: <472647A0.3030009@brookes.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <472647A0.3030009@brookes.ac.uk> User-Agent: Mutt/1.4.2.3i Subject: Re: Dangers of using a non-base shell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Bye List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2007 15:05:08 -0000 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. Hmm, I guess it *could* happen, but in the 8 years I have been using bash on FreeBSD, it never *has* happened. Of course, that's not to say that it never *will* happen... As long as you adopt a sensible approach to upgrading your installed ports, then I don't think you'll go far wrong - portupgrade can be made to rebuild dependent packages, so any significant change to libiconv can be picked up by all other packages that require it. > 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. You could instead do something like this (untested!): if (bash --version > /dev/null) then exec bash fi which will replace your login shell with a bash, as long as bash can successfully run and display its version info. Then you only have one shell to kill to log out. > > 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? Using a binary package will make no difference - it will still cause dependencies to be installed, just as if you built it from source. As long as you take time to check which ports/packages need updating at any particular time, and keep an eye on /usr/ports/UPDATING, then you shouldn't go far wrong. If you are really worried about it, then you can build a static bash, which you can then install on your / fs. Set WITH_STATIC_BASH and you can put the resulting monolithic binary anywhere you like. And yes, pkg_version -v will tell you which ports/packages are outdated, whether you installed them from binary packages or from source. To get a slightly clearer result, try # pkg_version -v | grep -v = to only see outdated ports. HTH Dan -- Daniel Bye _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \