Date: Sun, 12 Oct 1997 01:18:54 -0700 From: Jonathan Mini <mini@d198-232.uoregon.edu> To: Mike Smith <mike@smith.net.au> Cc: Jonathan Mini <mini@d198-232.uoregon.edu>, freebsd-emulation@FreeBSD.ORG Subject: Re: LINUX emulation and uname(3). Message-ID: <19971012011854.29188@micron.mini.net> In-Reply-To: <199710120346.NAA00872@word.smith.net.au>; from Mike Smith on Sun, Oct 12, 1997 at 01:16:10PM %2B0930 References: <19971011154149.56660@micron.mini.net> <199710120346.NAA00872@word.smith.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith <mike@smith.net.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971012011854.29188>