Commit 7617f793 authored by Till Brehm's avatar Till Brehm

Use improved centos version recognition from @dario.git.ispc

parent 25376579
......@@ -297,40 +297,19 @@ function get_distname() {
$distid = 'centos53';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 6 or compatible\n");
} elseif(stristr($content, 'CentOS Linux release 7.2')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos72';
$distconfid = 'centos72';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 7.2\n");
} elseif(stristr($content, 'CentOS Linux release 7.3')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos72';
$distconfid = 'centos72';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 7.3\n");
} elseif(stristr($content, 'CentOS Linux release 7.4')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos72';
$distconfid = 'centos72';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 7.4\n");
} elseif(stristr($content, 'CentOS Linux release 7.5')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos72';
$distconfid = 'centos72';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 7.5\n");
} elseif(stristr($content, 'CentOS Linux release 7')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos70';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 7 or compatible\n");
$var=explode(" ", $content);
$var=explode(".", $var[3]);
$var=$var[0].".".$var[1];
if($var=='7.0' || $var=='7.1') {
$distid = 'centos70';
} else {
$distid = 'centos72';
}
swriteln("Operating System: CentOS $var\n");
} else {
$distname = 'Redhat';
$distver = 'Unknown';
......
......@@ -273,38 +273,19 @@ class monitor_tools {
$distver = 'Unknown';
$distid = 'centos53';
$distbaseid = 'fedora';
} elseif(stristr($content, 'CentOS Linux release 7.2')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos70';
$distconfid = 'centos72';
$distbaseid = 'fedora';
} elseif(stristr($content, 'CentOS Linux release 7.3')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos72';
$distconfid = 'centos72';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 7.3\n");
} elseif(stristr($content, 'CentOS Linux release 7.4')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos72';
$distconfid = 'centos72';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 7.4\n");
} elseif(stristr($content, 'CentOS Linux release 7.5')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos72';
$distconfid = 'centos72';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 7.5\n");
} elseif(stristr($content, 'CentOS Linux release 7')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos70';
$distbaseid = 'fedora';
$var=explode(" ", $content);
$var=explode(".", $var[3]);
$var=$var[0].".".$var[1];
if($var=='7.0' || $var=='7.1') {
$distid = 'centos70';
} else {
$distid = 'centos72';
}
swriteln("Operating System: CentOS $var\n");
} else {
$distname = 'Redhat';
$distver = 'Unknown';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment