From owner-freebsd-emulation Sun Oct 12 01:19:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA07758 for emulation-outgoing; Sun, 12 Oct 1997 01:19:36 -0700 (PDT) (envelope-from owner-freebsd-emulation) Received: from d198-232.uoregon.edu (d198-232.uoregon.edu [128.223.198.232]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA07750 for ; Sun, 12 Oct 1997 01:19:34 -0700 (PDT) (envelope-from mini@d198-232.uoregon.edu) Received: (from mini@localhost) by d198-232.uoregon.edu (8.8.5/8.8.5) id BAA06628; Sun, 12 Oct 1997 01:18:54 -0700 (PDT) Message-ID: <19971012011854.29188@micron.mini.net> Date: Sun, 12 Oct 1997 01:18:54 -0700 From: Jonathan Mini To: Mike Smith Cc: Jonathan Mini , freebsd-emulation@FreeBSD.ORG Subject: Re: LINUX emulation and uname(3). References: <19971011154149.56660@micron.mini.net> <199710120346.NAA00872@word.smith.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.85e In-Reply-To: <199710120346.NAA00872@word.smith.net.au>; from Mike Smith on Sun, Oct 12, 1997 at 01:16:10PM +0930 X-file: The Truth is Out There Sender: owner-freebsd-emulation@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Mike Smith stands accused of saying: > > I have a question : How are these programs using the uname to detect if it's a > > linux system? are they jsut checkign to see that 'linux' exists in the uname > > string? > > Most scripts check the output of 'uname' for equivalence to 'Linux'. > There is a dummy 'uname' script installed as part of the Linux > emulation support that does the Right Thing in this regard. This > generally means that you need to be running a Linux-mode shell before > you start running the script. That is as I thought. > Applications calling uname() generally shouldn't (and don't) care what > the system type returned is; the one that started this thread was a > little un-savvy in that regard. > > > If so, it seems to me that returning something like > > 'Linux-emu (FreeVBSD blah.blah.blah)' would be a good solution. Also, this > > means that programs like Netscape (linux binary) would properly return the > > fact that it is running under linux emulation under FreeBSD. > > Programs like the Linux Netscape correctly report that they are running > on FreeBSD. If you are a Linux binary and uname() doesn't report I still run the Linux netscape 3.0 binaries, I never saw a reason to upgrade. (More truthfully, the Linux version worked great, and I am too lazy to fix things that work) > 'Linux', it may report 'FreeBSD', 'NetBSD', 'OpenBSD' or almost > anything else. Not handling this sensibly is a bug. Interesting. > > mike > -- Jonathan Mini Ingenious Productions Software Development P.O. Box 5693, Eugene, Or. 97405