[Opensim-dev] Determining Linux Platform (Distribution)

Dalien Talbot dalienta at gmail.com
Sat Jan 26 10:07:19 UTC 2008


IMHO if we have to write the distro-specific code, something is extremely
incorrect...

FWIW, apparently gentoo does not try to conform:

~ $ lsb_release
bash: lsb_release: command not found
~ $



/d

On Jan 26, 2008 4:35 AM, Joshua Garvin <jkaldon at gmail.com> wrote:

> 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
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080126/c9c3ade2/attachment-0001.html>


More information about the Opensim-dev mailing list