We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 877a0ee commit 5d0df4eCopy full SHA for 5d0df4e
server/lib/classes/cron.d/100-monitor_raid.inc.php
@@ -275,10 +275,14 @@ public function onRunJob() {
275
/*
276
* LSI MegaRaid
277
*/
278
- system('which megacli', $retval);
279
- system('which megacli64', $retval64);
280
- if($retval === 0 || $retval64 === 0) {
281
- $binary=@($retval === 0)?'megacli':'megacli64';
+ $binary = FALSE;
+ if ($app->system->is_installed('megacli')) {
+ $binary = 'megacli';
+ }
282
+ if ($app->system->is_installed('megacli64')) {
283
+ $binary = 'megacli64';
284
285
+ if($binary) {
286
$state = 'ok';
287
$data['output'] = shell_exec($binary.' -LDInfo -Lall -aAll -NoLog');
288
if (strpos($data['output'], 'Optimal') !== false) {
0 commit comments