Date: Sat, 15 Nov 2008 21:01:07 -0800 From: Jeremy Chadwick <koitsu@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: root /etc/csh Message-ID: <20081116050107.GA91940@icarus.home.lan> In-Reply-To: <20081116033624.GA13618@ourbrains.org> References: <20081110110805.GK1302@obspm.fr> <20081110161002.GA81960@gizmo.acns.msu.edu> <20081110203643.GH27646@obspm.fr> <200811102235.46971.fbsd.questions@rachie.is-a-geek.net> <Pine.GSO.4.63.0811102239200.846@hmacs.cmi.ua.ac.be> <4ad871310811101530p7b2baa0fk7f7b5118e314c11d@mail.gmail.com> <4918CE42.3050504@ccstores.com> <20081115061957.GA10998@ourbrains.org> <20081116023239.GA89267@icarus.home.lan> <20081116033624.GA13618@ourbrains.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081116050107.GA91940>