[Opensim-dev] Determining Linux Platform (Distribution)
Joshua Garvin
jkaldon at gmail.com
Sat Jan 26 09:52:12 UTC 2008
Does /etc/*version contain anything?
- josh
-----Original Message-----
From: Chris Down <chris.down at alcor.co.uk>
Sent: Saturday, January 26, 2008 3:23 AM
To: opensim-dev at lists.berlios.de
Subject: Re: [Opensim-dev] Determining Linux Platform (Distribution)
> On Linux, the best way to determine distribution information is to parse
> the output of "lsb_release -a". However, parsing the contents of
> /etc/lsb-release is a good second best.
>
> jkaldon at bullshark:~$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 6.06.1 LTS
> Release: 6.06
> Codename: dapper
>
> jkaldon at bullshark:~$ cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=6.06
> DISTRIB_CODENAME=dapper
> DISTRIB_DESCRIPTION="Ubuntu 6.06.1 LTS"
>
> Reasonably detailed and is present on any distribution who tries to
> conform to the Linux Standards Base. This includes RedHat, Debian, Ubuntu
> and many others I'm sure.
I can confirm that lsb_release -a produces the required information on
Opensuse.
chris at merak:~> lsb_release -a
LSB Version:
core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64:desktop-3.1-
amd64:desktop-3.1-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.1
-amd64:graphics-3.1-noarch
Distributor ID: SUSE LINUX
Description: openSUSE 10.3 (X86-64)
Release: 10.3
Codename: n/a
However the file /etc/lsb-release does not contain any distribution
information in Opensuse.
chris at merak:~> cat /etc/lsb-release
LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64
"
Regards
Chris Down
_______________________________________________
Opensim-dev mailing list
Opensim-dev at lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opensim-dev
More information about the Opensim-dev
mailing list