Skip to content

Commit 132e059

Browse files
author
jwarnier
committed
Fix typos, path to file which was moved and renamed and replace "which mdadm" call to file_exist('/proc/mdstat') as we are not using mdadm in this script anyway.
1 parent fdfd558 commit 132e059

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

server/mods-available/monitor_core_module.inc.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ function process($tablename, $action, $data) {
6969

7070
//** Get distribution identifier
7171
//** IMPORTANT!
72-
// This is the same code as in /install/install.php
73-
// So if you change it here, you also have to change it in /install/install.php!
72+
// This is the same code as in install/lib/install.lib.php
73+
// So if you change it here, you also have to change it in there!
7474
// Please do not forget to remove the swriteln(); - lines here at this file
7575
function get_distname() {
7676

@@ -838,11 +838,11 @@ function monitorSystemUpdate() {
838838
/** The type of the data */
839839
$type = 'system_update';
840840

841-
/* This monitoring is only available at debian or Ubuntu */
841+
/* This monitoring is only available on Debian or Ubuntu */
842842
if(file_exists('/etc/debian_version')) {
843843

844844
/*
845-
* first update the "update-database"
845+
* first update the "apt database"
846846
*/
847847
shell_exec('apt-get update');
848848

@@ -914,7 +914,7 @@ function monitorSystemUpdate() {
914914
}
915915
else {
916916
/*
917-
* It is not debian/Ubuntu, so there is no data and no state
917+
* It is not Debian/Ubuntu, so there is no data and no state
918918
*
919919
* no_state, NOT unknown, because "unknown" is shown as state
920920
* inside the GUI. no_state is hidden.
@@ -1001,16 +1001,15 @@ function monitorRaid() {
10011001
$type = 'raid_state';
10021002

10031003
/*
1004-
* We support some RAIDS. But if we can't find any of them, we have no data
1004+
* We support several RAID types, but if we can't find any of them, we have no data
10051005
*/
10061006
$state = 'no_state';
10071007
$data['output']= '';
10081008

10091009
/*
1010-
* Check, if we have mdadm installed (software-raid)
1010+
* Check, if Software-RAID is enabled
10111011
*/
1012-
system('which mdadm', $retval);
1013-
if($retval === 0) {
1012+
if(file_exists('/proc/mdstat')) {
10141013
/*
10151014
* Fetch the output
10161015
*/
@@ -1825,4 +1824,4 @@ function _getIntArray($line) {
18251824
return $res;
18261825
}
18271826
}
1828-
?>
1827+
?>

0 commit comments

Comments
 (0)