From owner-freebsd-hackers Mon Nov 9 10:34:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA04398 for freebsd-hackers-outgoing; Mon, 9 Nov 1998 10:34:08 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA04392 for ; Mon, 9 Nov 1998 10:34:07 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.9.1/8.8.8) id KAA10627; Mon, 9 Nov 1998 10:37:58 -0800 (PST) (envelope-from sgk) From: Steve Kargl Message-Id: <199811091837.KAA10627@troutmask.apl.washington.edu> Subject: Re: linux software installation and uname In-Reply-To: <19981109121815.A6400@emsphone.com> from Dan Nelson at "Nov 9, 1998 12:18:15 pm" To: dnelson@emsphone.com (Dan Nelson) Date: Mon, 9 Nov 1998 10:37:58 -0800 (PST) Cc: rivers@dignus.com, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Dan Nelson: > In the last episode (Nov 09), Steve Kargl said: > > According to Thomas David Rivers: > > > We've been here before. The consensus - after considerable debate > > > - was to not make such a change. > > > > It was only a pro-active suggestion. I was unaware of previous debate. > > > > > The problem is that several automated processes - particularly WEB > > > related - use uname to determine what kind of machines they are > > > running on. If we return "Linux" - then we inflate the linux > > > numbers at the cost of our own. > > > > It's better to infate the linux numbers, than to cut-off one's only > > means to run certain software. For example, there are no open source > > Fortran 90 compilers. You must purchase a commerical F90 compiler > > and run it under linux emulation. > > On the other hand, there are no good open source COBOL compilers. We > run Microfocus COBOL under SCO emulation. I vote we change FreeBSD's > uname to return "SCO_SV". Wait. I'm also running the BSD/OS Quake > server. I vote we change FreeBSD's uname to return "BSD/OS". Wait. > See a problem here? :) > % setenv ALT_UNAME SCO_SV % uname -s SCO_SV % setenv ALT_UNAME Linux % uname -s Linux % setenv ALT_UNAME FooOS % uname -s FooOS % unsetenv ALT_UNAME No, I don't see a problem. I'm suggesting a useful change to uname(1) not a change to uname(3). -- 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 10:28:06 1998 @@ -105,12 +105,15 @@ 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); + if (!getenv("ALT_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("%s%s", prefix, getenv("ALT_UNAME")); prefix = " "; } if (flags & NFLAG) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message