[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is there a way to positively, uniquely identify which Debian release a program is running on?

Andreas Tille <tillea@rki.de> writes:

> Everybody can change this to something else.  Isn't it better
> to implement a
>    /usr/bin/debian-release
> that contains an option to get the real version number that
> is hard coded anywhere if /etc/debian_version was changed?

Why not just use lsb_release(1)?

makholm@makholm:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux testing (etch)
Release:        testing
Codename:       etch

But I have no idea where these information come from. According to
/etc/debian_version I'm running'lenny/sid'. 

[... less /usr/bin/lsb_release ... ]

Hmmm, lsb_release seems to parse 'apt-cache policy' and hardcodes the
'testing is etch' connection.


Reply to: