"Hugo Garcia" <[EMAIL PROTECTED]> writes:
> Hi
>
> I have to modify a sh script that currently uses 'uname -s' to to
> distinquish between linux, freebsd and solaris. I would like to be
> more specific and add a test for the different versions of
> OpenSolaris. Is there a table somewhere with the different outputs
> from uname on diff versions of OpenSolaris?
>
> For example my 'uname -a; is
>
> $ uname -a
> SunOS boulder 5.11 snv_91 i86pc i386 i86pc Solaris
>
> What is it for an x86 32 bit machine? For a Sparc platform?...
Don't forget other platforms, like Xen.
SXCE Dom0:
SunOS xxx 5.11 snv_90 i86pc i386 i86xpv
OpenSolaris 2008.05 DomU:
SunOS xxx 5.11 snv_86 i86pc i386 i86xpv
Bear in mind that the "snv_xx" part is the kernel name, not always the
revision. On Solaris releases it's nearly always "Generic_123456-78"
where the number is the kernel patch level, but the person who builds
the kernel can choose the string.
BTW, are you sure that the word "Solaris" appears at the end of your
uname output?
Personally, I have code in my emacs startup to identify the OS. It's in
elisp, which you're welcome to, but basically it's:
Run uname -s
if it's "Linux":
grab more info with:
lsb_release -s -i
lsb_release -s -r
elseif it's "SunOS":
grab more info with:
uname -r
else:
just use the original uname -s output.
I haven't had to deal with freebsd yet but "Darwin" is enough for me ATM
on MacOS X.
_______________________________________________
indiana-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/indiana-discuss