Re: ver_linux script

From: Albert D. Cahalan (acahalan@cs.uml.edu)
Date: Thu Mar 09 2000 - 22:05:52 EST


Ville Herva writes:
> On Thu, Mar 09, 2000 at 10:09:25AM -0500, you [Tim Coleman] claimed:
>> On Wed, Mar 08, 2000 at 06:35:18PM +0200, Ville Herva wrote:

>>> Perhaps "uname -a" in linux_ver script should changed to
>>> "cat /proc/version"?
>>
>> Or maybe uname should be changed to include the compiler?
>>
>> Just a thought
>
> Sounds good unless there are some kind of unix standard issues on what
> uname should return.

The standard is "The Single UNIX(R) Specification, Version 2".
It is a bit vague, so I also checked Solaris 7, IRIX 6.3, and
Digital UNIX 4.0 for extensions and interpretations.

It would be most correct to do this:

-s Linux (or "RedHat")
-n host.example.com
-r 2.2.11 (or "6.2" or "2.1")
-v build23_gcc2.7.2.3_date952640409_opt686smp
-m K6-2
-p ia32
-i Compaq,Presario-7360
-d pre4

In all cases, output should be in the order shown. That is, there
should be no command that could produce "2.2.11 Linux".

The -a option should produce the first 5 values: -snrvm

Option -i will surely often be UNKNOWN,UNKNOWN (vendor comma model)
The model name ought to use the '-' character as needed.

Note that option -m is "K6-2", not "i686". (but that isn't terrible)
Currently I get "unknown" for -p, even though "ia32" is obvious.

While it is legal to have spaces, normal systems would use '_' in
the -v output or only have a single integer. One could put any sort
of vendor-specific junk in this field. It might even be best to use
this for non-kernel data, such as libc and distribution version.

Considering what "uname" is actually used for, one could argue
that it should report about C library and distribution versions.

I get "GNU sh-utils" for who made my Linux uname command, so maybe
somebody could report this problem to RMS or whoever. I suppose it
is most important to fix -p and remove whitespace from -v.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:17 EST