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

Re: Detecting RedHat distribution version

Nick Ing-Simmons
October 26, 1999 18:35
Re: Detecting RedHat distribution version
Message ID:
Paul Schinder <> 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
>So don't go making too many assumptions just because 
>/etc/redhat-release exists.  In this case, it's a symbolic link to 

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
nick@bactrian:~ > rpm -qf /etc/SuSE-release
nick@bactrian:~ >
The rpm probe seems useless...

Nick Ing-Simmons Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About