From 71acf0c101aac65de71c0d2b45b38e55ecbffcf2 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Tue, 19 Feb 2013 09:09:12 -0500 Subject: [PATCH] - Fixed FS#2678 - Error message whith mailman while updating ispconfg. --- server/lib/classes/monitor_tools.inc.php | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index b5ca043..68cb55d 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -117,7 +117,6 @@ $relname = "UNKNOWN"; } $distver = $ver.$lts." ".$relname; - swriteln("Operating System: ".$distver."\n"); } elseif(trim(file_get_contents('/etc/debian_version')) == '4.0') { $distname = 'Debian'; $distver = '4.0'; @@ -136,7 +135,7 @@ } elseif (strstr(trim(file_get_contents('/etc/debian_version')), '7.0') || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') { $distname = 'Debian'; $distver = 'Wheezy/Sid'; - $distid = 'debian70'; + $distid = 'debian60'; $distbaseid = 'debian'; } else { $distname = 'Debian'; @@ -486,7 +485,7 @@ $state = 'ok'; /** Fetch the data of ALL devices into a array (needed for monitoring!) */ - $dfData = shell_exec('df -hT'); + $dfData = shell_exec('df -hT 2>/dev/null'); // split into array $df = explode("\n", $dfData); @@ -1149,6 +1148,7 @@ $data['output'] = shell_exec('tw_cli info c0'); $state = 'ok'; + if(is_array($data['output'])) { foreach ($data['output'] as $item) { if (strpos($item, 'RAID') !== false) { if (strpos($item, ' VERIFYING ') !== false) { @@ -1192,6 +1192,7 @@ } } } + } } -- Gitblit v1.9.1