bash- superuser

Erik Trulsson ertr1013 at student.uu.se
Tue Dec 21 03:34:28 PST 2004


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.)


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-questions mailing list