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

Re: Detecting RedHat distribution version

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
October 26, 1999 18:35
Subject:
Re: Detecting RedHat distribution version
Message ID:
E11gIvv-0001Od-00@serv1.is1.u-net.net
Paul Schinder <schinder@pobox.com> writes:
>
>
>On Yellow Dog Linux, a PPC distribution that has nothing to do with 
>RedHat except it's modeled after it:
>
>linux% cat /etc/redhat-release
>Yellow Dog Linux (CS-1.1)
>
>linux% rpm -qf /etc/redhat-release
>yellowdog-release-CS_1.1-1
>
>So don't go making too many assumptions just because 
>/etc/redhat-release exists.  In this case, it's a symbolic link to 
>/etc/yellowdog-release.

So we seem to look for _files_ (not links) of form /etc/*-release

FWIW (next to nothing as far as I can tell) on SuSE 6.1: 

nick@bactrian:~ > ls /etc/*release
/etc/SuSE-release
nick@bactrian:~ > rpm -qf /etc/SuSE-release
aaa_base-99.4.19-0
nick@bactrian:~ >
 
The rpm probe seems useless...

-- 
Nick Ing-Simmons


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