Date: Mon, 9 Nov 1998 20:46:56 +0000 (GMT) From: Phillip Salzman <psalzman@gamefish.pcola.gulf.net> To: Steve Kargl <sgk@troutmask.apl.washington.edu> Cc: hackers@FreeBSD.ORG Subject: Re: linux software installation and uname Message-ID: <Pine.BSF.4.05.9811092045220.7784-100000@gamefish.pcola.gulf.net> In-Reply-To: <199811091712.JAA10172@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9811092045220.7784-100000>