summaryrefslogtreecommitdiff
diff options
-rwxr-xr-xbin/disk_smart3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/disk_smart b/bin/disk_smart
index 1aea483c..ff3e102d 100755
--- a/bin/disk_smart
+++ b/bin/disk_smart
@@ -35,6 +35,7 @@ USB/eSATA/eSAS attached storage devices.
Changelog:
+v1.4: Fix script failure on disks with no pre-existing SMART tests
v1.3: Fix detection of SMART availability & activate SMART if available
but deactivated. Also use smartctl return value rather than string-
matching to determine if a test has failed; this should be more
@@ -167,7 +168,7 @@ def get_smart_entries(disk, type='selftest'):
line = next(stdout_lines)
if not line.startswith('Num'):
entries.append('No entries found in log yet')
- return entries
+ return entries, returncode
columns = ['number', 'description', 'status',
'remaining', 'lifetime', 'lba']
lengths = [line.index(i) for i in line.split()]