Re: Is there a way to positively, uniquely identify which Debian release a program is running on?
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