mirror of
https://github.com/unraid/webgui.git
synced 2026-03-09 04:21:27 -05:00
More SMART fixes for unassigned devices
This commit is contained in:
@@ -16,11 +16,18 @@ Cond="strpos($disks[$name]['status'],'_NP')===false"
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$date = date('Ymd-Hi');
|
||||
$dev = $dev ?? $name;
|
||||
$date = $date ?? date('Ymd-Hi');
|
||||
$live = exec("hdparm -C ".escapeshellarg("/dev/$dev")."|grep -Pom1 'active|unknown'");
|
||||
$zip = str_replace(' ','_',strtolower($var['NAME']))."-smart-$date.zip";
|
||||
|
||||
// deal with unassigned devices
|
||||
if (!$dev) {
|
||||
$dev = $name;
|
||||
foreach ($devs as $disk) {
|
||||
if ($disk['device']==$name) {$file = $disk['id']."-$date.txt"; break;}
|
||||
}
|
||||
}
|
||||
|
||||
function spindownDelay() {
|
||||
global $spindown, $delay;
|
||||
$tmp = "/var/tmp/$spindown";
|
||||
|
||||
Reference in New Issue
Block a user