Commit a633f2ed authored by Mike Hibler's avatar Mike Hibler

Be a little more flexible in matching against smartctl output.

In particular, do a case-insensitive match with "serial number".
parent 50a22fc9
......@@ -170,7 +170,7 @@ sub find_serial($)
if (-x "$SMARTCTL") {
@lines = `$SMARTCTL -i /dev/$dev 2>&1`;
foreach (@lines) {
if (/^Serial Number:\s+(\S.*)/) {
if (/^serial number:\s+(\S.*)/i) {
return $1;
}
}
......
......@@ -151,7 +151,7 @@ sub find_serial($)
if (-x "$SMARTCTL") {
@lines = `$SMARTCTL -i /dev/$dev 2>&1`;
foreach (@lines) {
if (/^Serial Number:\s+(\S.*)/) {
if (/^serial number:\s+(\S.*)/i) {
return $1;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment