[CentOS-devel] /etc/redhat-release

Thu Jun 12 10:35:37 UTC 2014
Karanbir Singh <mail-lists at karan.org>

On 06/12/2014 11:29 AM, Farkas Levente wrote:
> On 06/12/2014 12:04 PM, John R. Dennison wrote:
>> On Thu, Jun 12, 2014 at 10:58:31AM +0100, Dan Porter wrote:
>>> Hi Fred,
>>>
>>> You should checkout how Virtualmin does system version
>>> detection.
>>>
>>> http://software.virtualmin.com/lib/oschooser.pl 
>>> http://software.virtualmin.com/lib/os_list.txt
>>
>> Which does it the 100% wrong way.
>>
>> Again, contents of /etc/*-release _can not be trusted_.
> 
> the proper way for this is:
> rpm -q --nosignature --qf "%{VERSION}" --whatprovides redhat-release

shouldnt that be system-release ?


-- 
Karanbir Singh
+44-207-0999389 | http://www.karan.org/ | twitter.com/kbsingh
GnuPG Key : http://www.karan.org/publickey.asc