Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2011 09:33:21 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Ed Schouten <ed@80386.nl>
Cc:        arch@freebsd.org
Subject:   Re: The strangeness called `sbin'
Message-ID:  <CAGE5yCqMcHwAhXKbyEH6vUR=N14tCjkgX=RMJTdq-po92GcOMQ@mail.gmail.com>
In-Reply-To: <20111110171605.GI2164@hoeg.nl>
References:  <20111110123919.GF2164@hoeg.nl> <CAGE5yCr3BzWzwOAqo7wifgUTRC%2BG=2o4bDmk9H-%2BCxr=zJqYmw@mail.gmail.com> <20111110171605.GI2164@hoeg.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 10, 2011 at 9:16 AM, Ed Schouten <ed@80386.nl> wrote:
> Hi Peter,
>
> * Peter Wemm <peter@wemm.org>, 20111110 17:56:
>> Of course, that pales in comparison to the impact of adding
>> /usr/local/bin to the path, but it does show this does have potential
>> user visibility. =A0And there's also the issue that most most users add
>> every possible directory to their $PATH anyway.
>
> Exactly. Also, there are shells nowadays that cache all binaries in PATH
> up front, such as zsh. When they start, they loop through all dirents in
> all directories in $PATH and add it to a big cache. This entirely
> defeats this purpose.

I use tcsh and zsh, I'm aware of this cache.

However, libc doesn't, so things like /bin/sh when running shell
scripts do not.  make(1) does not.  People do still care about
buildworld time.  Simple things like changing gcc to static linking
were a few percentage points of buildworld time, back in the day.
Having /bin/sh as a static binary used to be 3%-5% of buildworld time,
simply because fork/exec was faster as the copy-on-write burden was
less.  This stuff adds up.

> I don't think that there are that many people who don't add /sbin and
> /usr/sbin to $PATH nowadays. I have colleagues of mine who use Linux
> systems that don't have this in their $PATH. When I ask them whether it
> causes problems for them, they deny, but it turns out they simply put
> `sudo' in front of it, to work around that, regardless of whether it was
> needed.

Having /sbin in $PATH where /sbin is a symlink to /bin would be worse
than having no /sbin at all, from a perspective of rootvnode lock
lifetime.  If you can figure out how to get people to remove /sbin and
/usr/sbin from their paths after the symlink changes then it becomes a
moot point.  But heck, I still have /usr/X11R6 in mine... :(

--=20
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
"All of this is for nothing if we don't go to the stars" - JMS/B5
"If Java had true garbage collection, most programs would delete
themselves upon execution." -- Robert Sewell



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGE5yCqMcHwAhXKbyEH6vUR=N14tCjkgX=RMJTdq-po92GcOMQ>