From owner-freebsd-questions@FreeBSD.ORG Sun Nov 16 05:01:10 2008 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 0A1271065688 for ; Sun, 16 Nov 2008 05:01:10 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA05.westchester.pa.mail.comcast.net (qmta05.westchester.pa.mail.comcast.net [76.96.62.48]) by mx1.freebsd.org (Postfix) with ESMTP id A20678FC16 for ; Sun, 16 Nov 2008 05:01:09 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA01.westchester.pa.mail.comcast.net ([76.96.62.11]) by QMTA05.westchester.pa.mail.comcast.net with comcast id fgqH1a0070EZKEL55h18iL; Sun, 16 Nov 2008 05:01:08 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA01.westchester.pa.mail.comcast.net with comcast id fh171a0072P6wsM3Mh17m5; Sun, 16 Nov 2008 05:01:08 +0000 X-Authority-Analysis: v=1.0 c=1 a=QycZ5dHgAAAA:8 a=dCyKhr079knvLUYGJPcA:9 a=t5NB39jDfaSU_e3l_9kA:7 a=mTdxswvv-QbbmY7a1tF27dGZcbsA:4 a=EoioJ0NPDVgA:10 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 21EEF33C36; Sat, 15 Nov 2008 21:01:07 -0800 (PST) Date: Sat, 15 Nov 2008 21:01:07 -0800 From: Jeremy Chadwick To: freebsd-questions@freebsd.org Message-ID: <20081116050107.GA91940@icarus.home.lan> References: <20081110110805.GK1302@obspm.fr> <20081110161002.GA81960@gizmo.acns.msu.edu> <20081110203643.GH27646@obspm.fr> <200811102235.46971.fbsd.questions@rachie.is-a-geek.net> <4ad871310811101530p7b2baa0fk7f7b5118e314c11d@mail.gmail.com> <4918CE42.3050504@ccstores.com> <20081115061957.GA10998@ourbrains.org> <20081116023239.GA89267@icarus.home.lan> <20081116033624.GA13618@ourbrains.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081116033624.GA13618@ourbrains.org> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: root /etc/csh X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Nov 2008 05:01:10 -0000 On Sat, Nov 15, 2008 at 10:36:24PM -0500, Dan wrote: > Jeremy Chadwick(koitsu@FreeBSD.org)@2008.11.15 18:32:39 -0800: > > > Problem solved. Why doesn't FreeBSD ship bash and other shells besides > > > the `sh' linked statically is beyond me. It wouldn't break ports, would > > > it? > > > > It does break ports. Very, very badly. I know because I've personally > > attempted replacing /bin/sh with bash as a "I have a weekend to spare" > > project. > > You misunderstand. I do not suggest replacing the standard shell with > bash, I suggest that the shells available in FreeBSD, even through ports > to be linked statically so they can be used for rescue and recovery. > If the default make instructions told to compile statically, it wouldn't > break the ports. You're right -- I'm still not understanding. So let me cover the bases here: 1) The entire ports and FreeBSD build system (see: world) rely heavily on /bin/sh-isms and do not work with bash. bash being compiled statically will not solve these problems. 2) Changing the root users' shell is not recommended. There are a lot of reasons for this, but as mentioned, the main one is single-user scenarios (where /usr hasn't been mounted yet, thus /usr/local/bin/bash is not available -- and if it's installed as /bin/bash, the libraries /bin/bash link to are not available). 3) You can build bash statically; make WITH_STATIC_BASH=true. I do not know the true reason why the port is not built statically by default, but I can give you a damn good reason why it shouldn't be: complete and total wasted memory. Take into consideration environments where there are hundreds (or at my place of work, thousands) of users logged into a machine at once. Many of those are going to have /usr/local/bin/bash as their shell. A statically-linked version of bash would waste significant amounts of memory, while a dynamically-linked/shared version would ease that pain. The same applies for any static vs. dynamic program. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |