summaryrefslogtreecommitdiff
path: root/smartinfo
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2018-02-28 23:46:23 +0500
committerAnton Bobov <abobov@gmail.com>2018-02-28 23:47:25 +0500
commit88fcd4ab2ea43395da996ccfe067b3b5651eb458 (patch)
treeb752a8cf02392609db71b79555d682f1a8574cc7 /smartinfo
parenta0e40445545966ffceb06e1cf809a13c105661b4 (diff)
[smart] Add support to SAS disks.
Diffstat (limited to 'smartinfo')
-rwxr-xr-xsmartinfo4
1 files changed, 2 insertions, 2 deletions
diff --git a/smartinfo b/smartinfo
index 0675b13..95b4c2f 100755
--- a/smartinfo
+++ b/smartinfo
@@ -9,8 +9,8 @@ die() {
}
get_file_name() {
- sn=$(sed -n 's/^Serial Number: \+//p' < "$1")
- dm=$(sed -n 's/^Device Model: \+//p' < "$1")
+ sn=$(sed -n 's/^Serial Number: \+//ip' < "$1")
+ dm=$(sed -n 's/^\(Device Model\|Product\): \+//ip' < "$1")
printf 'smart-%s-%s-%s.txt' "$dm" "$sn" "$(date +%F-%H-%M-%S)" | tr ' ' '_'
}