From owner-freebsd-hackers Mon Nov 9 12:17:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA16481 for freebsd-hackers-outgoing; Mon, 9 Nov 1998 12:17:09 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA16475 for ; Mon, 9 Nov 1998 12:17:07 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id MAA29423; Mon, 9 Nov 1998 12:13:39 -0800 (PST) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpdw29421; Mon Nov 9 20:13:35 1998 Date: Mon, 9 Nov 1998 12:13:04 -0800 (PST) From: Julian Elischer 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 This has been a source of much contention. it should be an option of some sort.. preferably run-time but possibly compile time. julian 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