[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New uname option to query exact OS distribution

From: Paul Eggert
Subject: Re: New uname option to query exact OS distribution
Date: Mon, 23 Aug 2004 23:28:03 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Markus Kuhn <address@hidden> writes:

> The person preparing uname for inclusion into a distribution package
> will have to manually provide values for these four fields in a
> configuration file. To ensure that this is not forgotten, the uname
> distribution should refuse to compile out of the box, until these
> values have been configured.

Coreutils is supposed to build "out of the box" on pretty much any
POSIX-conforming system.  I'd rather not see new artificial barriers
to its use.  It'd be better for uname to report "unknown" for values
that it hasn't been properly configured for.

Also, sometimes people build programs under one distribution and run
them under another.  uname should report values suitable for the
current environment, not for the build environment.

One more thought: we've tried to resist adding lots of special-case
code to the "uname" command.  It was originally a simple utility: a
small layer around a system call.  Even now, the general idea is that
if the information can't easily be found from a "uname"-like system
call, then it's probably not a suitable subject for the "uname"

>   $ uname -d
>   SuSE Linux Professional 9.1 (DVD 32-bit)
>   $ uname -dv
>   SuSE
>   $ uname -dp
>   Linux Professional
>   $ uname -dr
>   9.1
>   $ uname -da
>   DVD 32-bit

This syntax isn't quite right, since '-d' either must take an operand
(in which case "uname -d" is invalid) or must not take one (in which
case "uname -da" usurps the existing meaning of "uname -a").

One way to work around this problem would be to use new letters, e.g.,
-V, -P, -R, -A for the four options you mentioned.  Presumably "uname
-a" would output all four, in addition to the information it already
outputs.  POSIX allows this.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]