Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 May 2007 14:52:18 -0500
From:      Eric Anderson <anderson@freebsd.org>
To:        John E Hein <jhein@timing.com>
Cc:        emulation@freebsd.org
Subject:   Re: sym links to absolute pathnames in /compat/linux
Message-ID:  <46379A72.2080406@freebsd.org>
In-Reply-To: <17975.37939.743304.357841@gromit.timing.com>
References:  <17975.37939.743304.357841@gromit.timing.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/01/07 14:25, John E Hein wrote:
> Are sym links to absolute pathnames supposed to try to look
> in /compat/linux first?
> 
> /compat/linux/usr/bin/foo -> /bin/foo
> 
> I thought I recalled that Alexander said recently they _were_ supposed
> to look in /compat/linux first.  But I don't seem to have that
> behavior on the 6-stable box I'm using at the moment.
> 
> # ln -s /bin/foo /compat/linux/usr/bin/foo
> # ls -l /compat/linux/usr/bin/foo
> lrwxr-xr-x  1 root  wheel  8 May  1 19:17 /compat/linux/usr/bin/foo -> /bin/foo
> # cp -p /compat/linux/bin/ls /compat/linux/bin/foo
> # cp -p /bin/ls /bin/foo
> # /compat/linux/usr/bin/foo --version
> foo: illegal option -- -
> usage: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwx1] [file ...]
> # /compat/linux/bin/foo --version
> ls (coreutils) 5.2.1
> Written by Richard Stallman and David MacKenzie.


Is all that taking place inside a linux shell?

If not, then the symlink resolution is happening *before* the linux 
emulator takes over.

Try this instead:

# /compat/linux/bin/sh
# /compat/linux/usr/bin/foo --version
# /compat/linux/bin/foo --version
# /bin/foo --version


Eric




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46379A72.2080406>