[Opensim-dev] Determining Linux Platform (Distribution)

Joshua Garvin jkaldon at gmail.com
Sat Jan 26 03:35:56 UTC 2008


Hi everyone,

I realize that what I'm addressing was only a temporary solution to fix
problems with keeping avatars upright, but I thought I'd mention it anyway
in case anyone else has to write platform specific code.

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.

Just my $0.02 -- hope it helps someone.

- Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080125/1b97f5d5/attachment-0001.html>


More information about the Opensim-dev mailing list