diff options
| author | Rod Smith <rod.smith@canonical.com> | 2014-11-13 08:19:44 -0500 |
|---|---|---|
| committer | Rod Smith <rod.smith@canonical.com> | 2014-11-13 08:19:44 -0500 |
| commit | 1cc7572670fd5553ffbb839cad7dcd93848aab5f (patch) | |
| tree | 3c9ac69c3d835c0317881fefcedd093c3072abf1 | |
| parent | c0452073dd373874c33428c871d39787c33eac08 (diff) | |
Fix bug 1392010: SMART test failure on new disks
| -rwxr-xr-x | bin/disk_smart | 3 |
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()] |
