vogelor
2008-12-18 abc09ddbb12d4332a08b115e1b69baec9a1b030a
improvement of the RAID-State
1 files modified
16 ■■■■■ changed files
server/mods-available/monitor_core_module.inc.php 16 ●●●●● patch | view | raw | blame | history
server/mods-available/monitor_core_module.inc.php
@@ -636,6 +636,22 @@
                    /* both Disk are not working */
                    $state = $this->_setState($state, 'error');
                }
                if (strpos($line, '[UU]') !== false)
                {
                    /* The disks are OK.
                     * if the next line starts with "[>" or "[=" then
                     * recovery (resync) is in state and the state is
                     * information instead of ok
                     */
                    $nextLine = $tmp[$i+1];
                    if ((strpos($nextLine, '[>') === false) && (strpos($nextLine, '[=') === false)) {
                        $state = $this->_setState($state, 'ok');
                    }
                    else
                    {
                        $state = $this->_setState($state, 'info');
                    }
                }
            }
        }