develooper Front page | perl.perl5.porters | Postings from October 1999

Re: Detecting RedHat distribution version

Thread Previous | Thread Next
From:
Kurt D. Starsinic
Date:
October 26, 1999 14:41
Subject:
Re: Detecting RedHat distribution version
Message ID:
19991026173142.B20344@O2.chapin.edu
On Tue, Oct 26, 1999 at 02:55:15PM -0400, Andy Dougherty wrote:
> I'm currently trying to patch Configure to tell you the Linux
> distribution (RedHat, SuSE, Debian, others as folks supply the
> information), and I'm unsure of how to best parse RedHat's
> /etc/redhat-release file. I have the following 1 example:
> 
> 	Red Hat Linux release 6.1 (Cartman)
> 
> I'm guessing that the '6.1' is what would be most useful. Does anyone have
> a variety of Red Hat systems around or enough familiarity with Red Hat to
> say how stable that format is or give me other examples?

    For Debian, read /etc/debian_version, which contains a single word.
Recent versions will contain the following:

    Debian Version    Contents of file
    1.3               bo
    2.0               hamm
    2.1               slink
    2.2               potato

    Peace,
* Kurt Starsinic (Kurt.Starsinic@isinet.com) --------- Technical Specialist *
|              `Perl is the Cliff Notes of Unix.' - Larry Wall              |
Institute for Scientific Information                   http://www.isinet.com/


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About