diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 9312a8981aefd6059df70ae4c5a4cc40b49b747d..2ed873d9baf4799e80d5c556232a8cb4f50d51bc 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -345,15 +345,15 @@ function get_distname() { $distid = 'centos72'; } swriteln("Operating System: CentOS $var\n"); - } elseif(stristr($content, 'CentOS Linux release 8')) { - $distname = 'CentOS'; - $distver = 'Unknown'; - $distbaseid = 'fedora'; + } elseif(stristr($content, 'CentOS Linux release 8')) { + $distname = 'CentOS'; + $distver = 'Unknown'; + $distbaseid = 'fedora'; $distid = 'centos80'; - $var=explode(" ", $content); - $var=explode(".", $var[3]); - $var=$var[0].".".$var[1]; - swriteln("Operating System: CentOS $var\n"); + $var=explode(" ", $content); + $var=explode(".", $var[3]); + $var=$var[0].".".$var[1]; + swriteln("Operating System: CentOS $var\n"); } else { $distname = 'Redhat'; $distver = 'Unknown'; diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 75e75c7f30e2db4d045c549079b6df95d286847f..e349acd12894c2251ae619d423f0226652ada6f2 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -323,14 +323,14 @@ class monitor_tools { } else { $distid = 'centos72'; } - } elseif(stristr($content, 'CentOS Linux release 8')) { - preg_match_all('/([0-9]{1,2})\.?([0-9]{0,2})\.?([0-9]*)/', $content, $version); - $distname = 'CentOS'; - $distver = is_array($version)? implode('.', array_filter(array($version[1][0],$version[2][0],$version[3][0]),'strlen')) :'Unknown'; - $distbaseid = 'fedora'; - $var=explode(" ", $content); - $var=explode(".", $var[3]); - $var=$var[0].".".$var[1]; + } elseif(stristr($content, 'CentOS Linux release 8')) { + preg_match_all('/([0-9]{1,2})\.?([0-9]{0,2})\.?([0-9]*)/', $content, $version); + $distname = 'CentOS'; + $distver = is_array($version)? implode('.', array_filter(array($version[1][0],$version[2][0],$version[3][0]),'strlen')) :'Unknown'; + $distbaseid = 'fedora'; + $var=explode(" ", $content); + $var=explode(".", $var[3]); + $var=$var[0].".".$var[1]; } else { $distname = 'Redhat'; $distver = 'Unknown';