mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
improve identification of smart drive types (#1345)
This commit is contained in:
@@ -335,8 +335,12 @@ func (sm *SmartManager) CollectSmart(deviceInfo *DeviceInfo) error {
|
|||||||
func (sm *SmartManager) smartctlArgs(deviceInfo *DeviceInfo, includeStandby bool) []string {
|
func (sm *SmartManager) smartctlArgs(deviceInfo *DeviceInfo, includeStandby bool) []string {
|
||||||
args := make([]string, 0, 7)
|
args := make([]string, 0, 7)
|
||||||
|
|
||||||
if deviceInfo != nil && deviceInfo.Type != "" {
|
if deviceInfo != nil {
|
||||||
args = append(args, "-d", deviceInfo.Type)
|
deviceType := strings.ToLower(deviceInfo.Type)
|
||||||
|
// types sometimes misidentified in scan; see github.com/henrygd/beszel/issues/1345
|
||||||
|
if deviceType != "" && deviceType != "scsi" && deviceType != "ata" {
|
||||||
|
args = append(args, "-d", deviceInfo.Type)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
args = append(args, "-aj")
|
args = append(args, "-aj")
|
||||||
|
|||||||
Reference in New Issue
Block a user