If you are looking for a way to find which CentOS version we are on, we could do something like
[root@host ~]# cat /etc/redhat-release | grep '7\..*'
CentOS Linux release 7.0.1406 (Core)
or more like your thoughts
[root@localhost ~]# yum list yum| grep '\.el7'
yum.noarch 3.4.3-118.el7.centos @anaconda
or even
[root@localhost ~]# yum list yum| grep '@anaconda'
yum.noarch 3.4.3-118.el7.centos @anaconda
How to Kloxo-MR know Centos 5 or 6?.
Try 'yum list yum' and we will see:
1. in Centos 5:
> yum list yum
Installed Packages
yum.noarch 3.2.22-40.el5.centos installed
- appear: 'installed'
2. in Centos 6:
> yum list yum
Installed Packages
yum.noarch 3.2.29-43.el6.centos @updates
- appear: '@'
So, Kloxo-MR using "yum list *yum*|grep '@'" to know Centos 5 or 6.
I hope Centos 7 have 'specific' chars to identify like '@' in Centos 6.