From owner-freebsd-emulation@FreeBSD.ORG Tue May 1 20:20:08 2007 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A489216A402 for ; Tue, 1 May 2007 20:20:08 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh2.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 7696813C43E for ; Tue, 1 May 2007 20:20:08 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from neutrino.centtech.com (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.8/8.13.8) with ESMTP id l41JqNXr073752; Tue, 1 May 2007 14:52:23 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <46379A72.2080406@freebsd.org> Date: Tue, 01 May 2007 14:52:18 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.0 (X11/20070420) MIME-Version: 1.0 To: John E Hein References: <17975.37939.743304.357841@gromit.timing.com> In-Reply-To: <17975.37939.743304.357841@gromit.timing.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/3189/Tue May 1 11:02:13 2007 on mh2.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh2.centtech.com Cc: emulation@freebsd.org Subject: Re: sym links to absolute pathnames in /compat/linux X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2007 20:20:08 -0000 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