Re: Is there a way to positively, uniquely identify which Debian release a program is running on?
- To: firstname.lastname@example.org, Santiago Vila <email@example.com>
- Subject: Re: Is there a way to positively, uniquely identify which Debian release a program is running on?
- From: Morten Kjeldgaard <firstname.lastname@example.org>
- Date: Fri, 01 Jun 2007 14:14:39 +0200
- Message-id: <[🔎] 46600DAF.email@example.com>
- In-reply-to: <20070531222056.GA18432@chistera.yi.org>
- References: <465DE2A6.firstname.lastname@example.org> <None.LNX.email@example.com> <20070531103307.GA18119@javifsp.no-ip.org> <20070531222056.GA18432@chistera.yi.org>
I once wrote a small python utility called udist that tries to work out
which distribution it runs on. It works on several RPM based
distributions, as well as the Debian based distros I've tested. I
originally had in mind putting the project on a public server and
involving more people to test and implement more distros but I never got
around to it.
The utility makes use of different strategies when attempting to fill
out the different fields. It can use LSB but can also carry on with out
it as in the example below.
This is the kind of output I get on my Ubuntu machine:
[mok@sebulpa udist]$ bin/udist
No LSB modules are available.
... and this is from a CentOS machine:
[mok@ghost ~]$ udist
desc:CentOS release 4.4 (Final)
By using switches (a la uname) you can output specific fields. I've put
a .tar.gz file here: ftp://ftp.bioxray.dk:/pub/mok/src/udist-0.5.tar.gz
if you're interested.
I anyone wants to join in and extend/rewrite/improve this utility, let
Morten Kjeldgaard, Asc. professor, Ph.D.
Department of Molecular Biology, Aarhus University
Gustav Wieds Vej 10 C, DK-8000 Aarhus C, Denmark
Lab +45 89425026 * Mobile +45 51860147 * Fax +45 86123178
Home +45 86188180 * http://www.bioxray.dk/~mok