Dave Russell
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
syno_hdd_db.sh
|
|
|
@ -727,10 +727,12 @@ fi |
|
|
|
# PCIe M.2 cards and connected Expansion Units. |
|
|
|
|
|
|
|
fixdrivemodel(){ |
|
|
|
# Remove " 00Y" from end of Samsung/Lenovo SSDs # Github issue #13 |
|
|
|
if [[ $1 =~ MZ.*" 00Y" ]]; then |
|
|
|
hdmodel=$(printf "%s" "$1" | sed 's/ 00Y.*//') |
|
|
|
fi |
|
|
|
|
|
|
|
# Brands that return "BRAND <model>" and need "BRAND " removed. |
|
|
|
if [[ $1 =~ ^[A-Za-z]{1,7}" ".* ]]; then |
|
|
|
# See Smartmontools database in /var/lib/smartmontools/drivedb.db |
|
|
|
hdmodel=${hdmodel#"WDC "} # Remove "WDC " from start of model name |
|
|
|
@ -745,7 +747,6 @@ fixdrivemodel(){ |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getdriveinfo(){ |
|
|
|
# $1 is /sys/block/sata1 etc |
|
|
|
usb=$(grep "$(basename -- "$1")" /proc/mounts | grep "[Uu][Ss][Bb]" | cut -d" " -f1-2) |
|
|
|
|