Wireshark-dev: Re: [Wireshark-dev] Should we support GTK+ 2.0[.x] and 2.2[.x], or just 2.4 and
From: Joerg Mayer <[email protected]>
Date: Thu, 24 Apr 2008 23:58:57 +0200
On Thu, Apr 24, 2008 at 12:55:47PM -0400, Jeff Morriss wrote:
> Guy Harris wrote:
> > Red Hat with a 2.4.x kernel; unfortunately, I don't know of any generic 
> > way to determine what version of what Linux distribution you're running 
> > on, so I don't know of any way to say "Red Hat Linux 8.1" in the -v output.
> 
> There's not really a generic way but there aren't _that_ many (major) 
> Linux distributions.
> 
> Redhat and (IIRC) CentOS have /etc/redhat-release; for example:
> 
> > Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
> 
> SuSe has /etc/SuSe-release; for example:
> 
> > SUSE LINUX Enterprise Server 9 (i586)
> > VERSION = 9
> 
> A Debian system nearby has its version info in /etc/lsb-release .

The standardized way is lsb_release:

[email protected]:~> lsb_release -a
LSB Version:    core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32:desktop-3.1-ia32:desktop-3.1-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: SUSE LINUX
Description:    openSUSE 11.0 (i586) Beta1plus
Release:        11.0
Codename:       n/a


 Ciao
      Joerg
-- 
Joerg Mayer                                           <[email protected]>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.