Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Nov 1998 12:13:04 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: linux software installation and uname
Message-ID:  <Pine.BSF.3.95.981109121154.13494D-100000@current1.whistle.com>
In-Reply-To: <199811091712.JAA10172@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.981109121154.13494D-100000>