From owner-freebsd-hackers Mon Nov 9 12:47:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA19528 for freebsd-hackers-outgoing; Mon, 9 Nov 1998 12:47:20 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from gamefish.pcola.gulf.net (gamefish.pcola.gulf.net [198.69.72.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA19484 for ; Mon, 9 Nov 1998 12:47:15 -0800 (PST) (envelope-from psalzman@gamefish.pcola.gulf.net) Received: from localhost (psalzman@localhost) by gamefish.pcola.gulf.net (8.9.1/8.9.1) with ESMTP id UAA09908; Mon, 9 Nov 1998 20:46:56 GMT (envelope-from psalzman@gamefish.pcola.gulf.net) Date: Mon, 9 Nov 1998 20:46:56 +0000 (GMT) From: Phillip Salzman To: Steve Kargl cc: hackers@FreeBSD.ORG Subject: Re: linux software installation and uname In-Reply-To: <199811091712.JAA10172@troutmask.apl.washington.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Like Microsoft Internet Explorer stating it is Mozilla? No. This is not something that would be good. Even as it would make it easier for installation scripts like that - we are not Linux. Its hard enough to explain that to people... I don't think it should be there... -- Phillip Salzman "BSDFF! YOU BLASD!" On Mon, 9 Nov 1998, Steve Kargl wrote: > Ladies and Gents, > > I've recently installed the Portland Groups's Fortran 90 > for Linux on my system (it works!). However, during the > installation from the cdrom, a install script is executed > that contains a test involving "uname -s" to ensure the > installation is on a system running Linux. Of course, > "uname -s" on a FreeBSD system returns "FreeBSD" instead > of the expected "Linux". Thus, I had to alter uname(1) > to report "Linux" to install the software. With the > expected availability of more commericial software for Linux, > it seems necessary to provide uname(1) the capability to > report "Linux" in place of "FreeBSD". > > -- > Steve > > finger kargl@troutmask.apl.washington.edu > http://troutmask.apl.washington.edu/~clesceri/kargl.html > > > *** uname.c.orig Mon Nov 9 08:46:41 1998 > --- uname.c Mon Nov 9 08:49:54 1998 > *************** > *** 105,116 **** > prefix = ""; > > if (flags & SFLAG) { > ! mib[0] = CTL_KERN; > ! mib[1] = KERN_OSTYPE; > ! len = sizeof(buf); > ! if (sysctl(mib, 2, &buf, &len, NULL, 0) == -1) > ! err(1, "sysctl"); > ! (void)printf("%s%.*s", prefix, (int)len, buf); > prefix = " "; > } > if (flags & NFLAG) { > --- 105,119 ---- > prefix = ""; > > if (flags & SFLAG) { > ! if (!getenv("LINUX_UNAME")) { > ! mib[0] = CTL_KERN; > ! mib[1] = KERN_OSTYPE; > ! len = sizeof(buf); > ! if (sysctl(mib, 2, &buf, &len, NULL, 0) == -1) > ! err(1, "sysctl"); > ! (void)printf("%s%.*s", prefix, (int)len, buf); > ! } else > ! (void)printf("%sLinux", prefix); > prefix = " "; > } > if (flags & NFLAG) { > *** uname.1.orig Mon Nov 9 09:06:23 1998 > --- uname.1 Mon Nov 9 09:08:56 1998 > *************** > *** 72,77 **** > --- 72,82 ---- > to standard output. > .It Fl s > Write the name of the operating system implementation to standard output. > + If the environmental variable > + .Em LINUX_UNAME > + is set, then write > + .Em Linux > + to standard output. > .It Fl v > Write the version level of this release of the operating system > to standard output. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message