[CentOS-devel] /etc/redhat-release

Thu Jun 12 10:38:42 UTC 2014
Florian La Roche <Florian.LaRoche at gmx.net>

On Thu, Jun 12, 2014 at 11:35:37AM +0100, Karanbir Singh wrote:
> 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 ?

Doesn't work on CentOS-4

best regards,

Florian La Roche