Commit beb35ef2 authored by Tapio Lehtonen's avatar Tapio Lehtonen

Fix comment to same style. lsb_release and os-release prettier output.

parent 862f3978
......@@ -166,7 +166,7 @@ if($ip_address && count($ips) > 0 && in_array($ip_address, $ips, true) == false)
outlog("[WARN] ip addresses from hostname differ from ifconfig output. Please check your ip settings.");
}
//Check OS version
// Check OS version
$lsbrel='/usr/bin/lsb_release';
$rhatrel = '/etc/redhat-release';
$osrelease='/etc/os-release';
......@@ -174,7 +174,7 @@ $suserel = '/etc/SuSE-release';
$gentoorel = '/etc/gentoo-release';
if (file_exists($lsbrel)) {
$os_version = shell_exec($lsbrel.' -d');
$os_version = shell_exec($lsbrel.' -d -s');
} elseif (file_exists($rhatrel)) {
$os_version = shell_exec('cat '.$redhatrel);
} elseif (file_exists($suserel)) {
......@@ -182,7 +182,7 @@ if (file_exists($lsbrel)) {
} elseif (file_exists($gentoorel)) {
$os_version = shell_exec('cat '.$gentoorel);
} elseif (file_exists($osrelease)) {
$os_version = shell_exec('cat '.$osrelease.' | grep "PRETTY_NAME"');
$os_version = shell_exec('cat '.$osrelease.' | grep "PRETTY_NAME" | cut --characters=13-');
} else {
$lslisting = shell_exec('ls -lhd /etc/*versio* /etc/*releas* /etc/*issue*');
}
......
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