From c26de6c3bbe0dedcf7be69efdc9d453d5f83ac35 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Tue, 8 Sep 2015 16:41:18 -0700 Subject: [PATCH] smart.pl: drive numbers are 1-based Signed-off-by: Dan Mick --- roles/testnode/files/libexec/smart.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/testnode/files/libexec/smart.pl b/roles/testnode/files/libexec/smart.pl index 9c4e03e0..4ae1aeb1 100644 --- a/roles/testnode/files/libexec/smart.pl +++ b/roles/testnode/files/libexec/smart.pl @@ -95,7 +95,7 @@ sub smartctl foreach ( $sector[9] ) { my $count = $_; - my $l = chr(ord('a') + $drive); + my $l = chr(ord('a') + $drive - 1); $message = "Drive $drive (sd$l) has $count $type sectors"; if ( ( $type =~ /reallocated/i && $count > $realloc ) && ( $type =~ /pending/i && $count > $pend ) && ( $type =~ /pending/i && $count > $uncorrect ) ) -- 2.47.3