From owner-freebsd-hackers Mon Nov 9 13:53:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA26946 for freebsd-hackers-outgoing; Mon, 9 Nov 1998 13:53:33 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA26940 for ; Mon, 9 Nov 1998 13:53:27 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id WAA08677; Mon, 9 Nov 1998 22:53:11 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id WAA16873; Mon, 9 Nov 1998 22:53:11 +0100 (MET) Message-ID: <19981109225310.34189@follo.net> Date: Mon, 9 Nov 1998 22:53:10 +0100 From: Eivind Eklund To: Steve Kargl Cc: hackers@FreeBSD.ORG Subject: Re: linux software installation and uname References: <199811091947.LAA11148@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199811091947.LAA11148@troutmask.apl.washington.edu>; from Steve Kargl on Mon, Nov 09, 1998 at 11:47:56AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Nov 09, 1998 at 11:47:56AM -0800, Steve Kargl wrote: > Here is the nice little uname test from the vendor's install script: > > # what type of target? > if test -x /usr/bin/uname ; then > uname=/usr/bin/uname > elif test -x /bin/uname ; then > uname=/bin/uname > else > # Never seen it anywhere but /bin or /usr/bin, so hopefully it's > # in $PATH already. > type uname > /dev/null 2>&1 > if test $? -ne 0 ; then > echo "install: uname not found in \$PATH environment variable" > quit > else > uname=uname > fi > fi > > You'll never pick up /compat/linux/bin/uname unless you delete/rename > /usr/bin/uname. Eh - I'm pretty sure /compat/linux is searched _before_ /. For all syscalls. This is hardcoded in the linux emulator in the kernel. So if /compat/linux/bin/uname exists, that will be run in preference to /bin/uname for anything Linux-emulated. We might still need a way of saying that a shell script is Linux-emulated, though - probably by running it through /compat/linux/bin/sh :-) Besides this, vendors should be pressured to test for uname in the right way to make their Linux software also work on FreeBSD. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message