mirror of
https://github.com/unraid/webgui.git
synced 2026-01-07 01:59:52 -06:00
Dashboard: fix smart health detection
This commit is contained in:
@@ -192,7 +192,8 @@ function device_smart(&$disk, &$fail, &$smart) {
|
||||
$text = _('healthy');
|
||||
$color = 'green';
|
||||
$file = "state/smart/$name";
|
||||
if (file_exists("$file") && exec("grep -Pom1 '^SMART.*: \K[A-Z]+' ".escapeshellarg($file)." |tr -d '\n' 2>/dev/null", $ssa) && in_array("$ssa",$failed)) {
|
||||
$ssa = file_exists($file) ? exec("grep -Pom1 '^SMART.+: \K[A-Z]+' ".escapeshellarg($file)) : "";
|
||||
if (in_array($ssa,$failed)) {
|
||||
$title = _('SMART health-check failed')."\n"; $thumb = 'thumbs-o-down'; $color = 'red'; $text = 'fail'; $fail++;
|
||||
} else {
|
||||
if (empty($saved["smart"]["$named.ack"])) {
|
||||
|
||||
Reference in New Issue
Block a user