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

Re: Determine system ver (Debian vs. other Linuxes) at runtime?

On Fri, Dec 30, 2005 at 03:43:59PM -0500, Chris Howie wrote:
> Hash: SHA1
> Matt England wrote:
> > So I'm left with figuring out much harder ways to tell system revs
> > apart.  I'm guessing I'm going to have to make an application which does
> > nothing but evaluate a system and report it's variant (Redhat vs SuSE
> > vs. Debian) and revision (Debian Woody/3.0, Sarge/3.1, etc).
> If /etc/debian_version exists, then it's debian, and the file contents should
> be the version number (which will be "testing/unstable" if the user is not
> running a stable release).

The situation is, i beleive, somewhat more complicated for Debian: 

If /etc/debian_version exists, then the system is very probably

The file contents are (if it IS debian) either the version number,
which is placed there by the install scripts, or whatever the local
sysadmin has decided to put there. This file IS available for local
sysadmin use. Also, i believe, dist-upgrade from stable to testing/
unstable does not change the contents. (But I'm not willing to 
dist-upgrade just to make sure, i'm right, so check what i'm saying
yourself if it really matters.)

Paul E Condon           

Reply to: