Date: Mon, 9 Nov 1998 10:37:58 -0800 (PST) From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: dnelson@emsphone.com (Dan Nelson) Cc: rivers@dignus.com, hackers@FreeBSD.ORG Subject: Re: linux software installation and uname Message-ID: <199811091837.KAA10627@troutmask.apl.washington.edu> In-Reply-To: <19981109121815.A6400@emsphone.com> from Dan Nelson at "Nov 9, 1998 12:18:15 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811091837.KAA10627>