mirror of
https://github.com/unraid/webgui.git
synced 2026-01-14 13:39:58 -06:00
Prevent unassigned devices from spinning up unnecessary
This commit is contained in:
@@ -259,7 +259,7 @@ foreach ($devs as $dev) {
|
||||
$name = $dev['device'];
|
||||
if (empty($name)) continue;
|
||||
$smart = "/var/local/emhttp/smart/$name";
|
||||
if (!file_exists($smart) || (time()-filemtime($smart)>=$var['poll_attributes'])) exec("smartctl -n standby -A ".escapeshellarg("/dev/$name")." > ".escapeshellarg($smart));
|
||||
if (!file_exists($smart) || (time()-filectime($smart)>=$var['poll_attributes'])) exec("smartctl -n standby -A ".escapeshellarg("/dev/$name")." > ".escapeshellarg($smart));
|
||||
$temp = exec("awk '\$1==190||\$1==194{print \$10;exit}' ".escapeshellarg($smart));
|
||||
$text = "device $name";
|
||||
$info = !empty($dev['id']) ? "{$dev['id']} ($name)": "No device identification ($name)";
|
||||
|
||||
Reference in New Issue
Block a user