Skip to content

Commit abc09dd

Browse files
author
vogelor
committed
improvement of the RAID-State
1 parent a5c833b commit abc09dd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

server/mods-available/monitor_core_module.inc.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,22 @@ function monitorRaid(){
636636
/* both Disk are not working */
637637
$state = $this->_setState($state, 'error');
638638
}
639+
if (strpos($line, '[UU]') !== false)
640+
{
641+
/* The disks are OK.
642+
* if the next line starts with "[>" or "[=" then
643+
* recovery (resync) is in state and the state is
644+
* information instead of ok
645+
*/
646+
$nextLine = $tmp[$i+1];
647+
if ((strpos($nextLine, '[>') === false) && (strpos($nextLine, '[=') === false)) {
648+
$state = $this->_setState($state, 'ok');
649+
}
650+
else
651+
{
652+
$state = $this->_setState($state, 'info');
653+
}
654+
}
639655
}
640656

641657
}

0 commit comments

Comments
 (0)