FreeNAS-Report icon indicating copy to clipboard operation
FreeNAS-Report copied to clipboard

Issue when self-tests contains "1 of 1 failed self-tests are outdated by newer successful extended offline self-test # 1"

Open lamtt77 opened this issue 3 years ago • 1 comments

Hello,

I encountered the same issue as described at "https://www.gitmemory.com/issue/edgarsuit/FreeNAS-Report/24/812802235"

Further error message: awk: newline in string newer... at source line 1

Temporary fix (added one more space at the end of "# 1": lastTestHours=$("$smartctl" -l selftest "$drive" | grep "# 1 " | awk '{print $9}')

lamtt77 avatar Sep 04 '21 05:09 lamtt77

An alternative fix would be: lastTestHours=$("$smartctl" -l selftest "$drive" | grep ^"# 1" | awk '{print $9}')

lamtt77 avatar Sep 04 '21 05:09 lamtt77