From owner-freebsd-questions@FreeBSD.ORG Tue Dec 21 11:34:27 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E47F816A4CE for ; Tue, 21 Dec 2004 11:34:27 +0000 (GMT) Received: from av7-2-sn4.m-sp.skanova.net (av7-2-sn4.m-sp.skanova.net [81.228.10.109]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2E2443D3F for ; Tue, 21 Dec 2004 11:34:26 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av7-2-sn4.m-sp.skanova.net (Postfix, from userid 502) id DC45C37F72; Tue, 21 Dec 2004 12:34:25 +0100 (CET) Received: from smtp4-2-sn4.m-sp.skanova.net (smtp4-2-sn4.m-sp.skanova.net [81.228.10.180]) by av7-2-sn4.m-sp.skanova.net (Postfix) with ESMTP id CC2AF37E66 for ; Tue, 21 Dec 2004 12:34:25 +0100 (CET) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp4-2-sn4.m-sp.skanova.net (Postfix) with SMTP id 3A19337E43 for ; Tue, 21 Dec 2004 12:34:25 +0100 (CET) Received: (qmail 16976 invoked by uid 1001); 21 Dec 2004 11:34:24 -0000 Date: Tue, 21 Dec 2004 12:34:24 +0100 From: Erik Trulsson To: Dick Davies Message-ID: <20041221113424.GA16961@falcon.midgard.homeip.net> Mail-Followup-To: Dick Davies , FreeBSD Questions References: <20041221101415.GA12067@lb.tenfour> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041221101415.GA12067@lb.tenfour> User-Agent: Mutt/1.5.6i cc: FreeBSD Questions Subject: Re: bash- superuser X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2004 11:34:28 -0000 On Tue, Dec 21, 2004 at 10:14:15AM +0000, Dick Davies wrote: > > (sorry if I cocked up your threading, readers - I accidentally deleted > Gregs mail and so pasted this from google groups). > > > .... There are a couple of reasons why this shouldn't > > happen: > > > > 1. You don't normally start networking until you have mounted your > > local file systems. > > 2. The problem is related to the invocation of su(1). It's not clear > > why that's there. > > > > Still, it shows that there are issues. It may be sufficient to > > document them. People who follow the advice in "The Complete FreeBSD" > > won't run into this problem, since they won't install a separate /usr > > file system. > > I thought the issue was the ldconfig path not being set up at the point > that pppd called su? > > pppd lives in /usr, after all :) Not quite. The issue was that the /etc/rc.d/ppp-user script calls su. su starts a shell - in this case it tried to start bash since that was root's shell. At that point in the process the system was not yet configured to find the libraries bash needed. ppp as such was fairly irrelevant - it was su that caused the problems. > > Assuming that's wrong, doesn't freebsd have a notion of 'critical filesystems' > and and 'pre-networking filesystems' a la NetBSD? > I used to have to set this on netbsd to get wicontrol from /usr before dhcp.... Probably, but /usr/local is probably not normally considered to be one. > > > > and would be a non-issue if you statically linked bash (I can't > > > think of any reason to want a dynamically linked one). > > > > One reason is that bash pulls in a lot of libraries. That's why we > > used dynamic libraries in the first place. > > That's a bit of a circular argument, isn't it? :) People Who Know have > advised me in the past that the VM system performs better if you statically > link common binaries - you get better reuse of memory. That depends. If you run many instances of the same binary at the same time you will probably get slightly better performance if it is statically linked. On the other hand if you several different binaries running all linked to the same libraries, then you get better memory reuse if they are dynamically linked since only one copy of the library needs to be loaded into memory (at least the code parts of the library.) -- Erik Trulsson ertr1013@student.uu.se