mirror of
https://github.com/webmin/webmin.git
synced 2025-07-20 16:48:46 +00:00
Assume NVME always supports SMART https://forum.virtualmin.com/t/nvme-to-usb-using-realtek-rtl9210b-and-smart-status-issue/115527/14
This commit is contained in:
@ -297,13 +297,16 @@ if (&get_smart_version() > 5.0) {
|
||||
|
||||
# Check support
|
||||
local $out = &backquote_command(
|
||||
"$config{'smartctl'} $extra_args -i $qd 2>&1");
|
||||
"$config{'smartctl'} $extra_args -i $qd 2>&1");
|
||||
if ($out =~ /SMART\s+support\s+is:\s+Available/i) {
|
||||
$rv{'support'} = 1;
|
||||
}
|
||||
elsif ($out =~ /Device\s+supports\s+SMART/i) {
|
||||
$rv{'support'} = 1;
|
||||
}
|
||||
elsif ($out =~ /NVMe\s+Version:/i) {
|
||||
$rv{'support'} = 1;
|
||||
}
|
||||
else {
|
||||
$rv{'support'} = 0;
|
||||
}
|
||||
@ -317,6 +320,9 @@ if (&get_smart_version() > 5.0) {
|
||||
# Added to match output from RHEL5
|
||||
$rv{'enabled'} = 1;
|
||||
}
|
||||
elsif ($out =~ /NVMe\s+Version:/i) {
|
||||
$rv{'enabled'} = 1;
|
||||
}
|
||||
else {
|
||||
# Not enabled!
|
||||
$rv{'enabled'} = 0;
|
||||
@ -545,9 +551,6 @@ if ($drive && defined($drive->{'subdisk'})) {
|
||||
elsif ($config{'ata'}) {
|
||||
$extra_args .= " -d ata";
|
||||
}
|
||||
else {
|
||||
$extra_args .= " -d auto";
|
||||
}
|
||||
return $extra_args;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user