Browse Source
Update syno_hdd_db.sh
Reinstated removing brand from start of drive model.
pull/28/head
007revad
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
15 additions and
1 deletions
-
syno_hdd_db.sh
|
|
@ -86,7 +86,7 @@ |
|
|
# Optionally disable "support_disk_compatibility". |
|
|
# Optionally disable "support_disk_compatibility". |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scriptver="v1.2.20" |
|
|
scriptver="v1.2.21" |
|
|
script=Synology_HDD_db |
|
|
script=Synology_HDD_db |
|
|
repo="007revad/Synology_HDD_db" |
|
|
repo="007revad/Synology_HDD_db" |
|
|
|
|
|
|
|
|
@ -296,6 +296,20 @@ fixdrivemodel(){ |
|
|
if [[ $1 =~ MZ.*" 00Y" ]]; then |
|
|
if [[ $1 =~ MZ.*" 00Y" ]]; then |
|
|
hdmodel=$(printf "%s" "$1" | sed 's/ 00Y.*//') |
|
|
hdmodel=$(printf "%s" "$1" | sed 's/ 00Y.*//') |
|
|
fi |
|
|
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 |
|
|
|
|
|
hdmodel=${hdmodel#"HGST "} # Remove "HGST " from start of model name |
|
|
|
|
|
hdmodel=${hdmodel#"TOSHIBA "} # Remove "TOSHIBA " from start of model name |
|
|
|
|
|
|
|
|
|
|
|
# Old drive brands |
|
|
|
|
|
hdmodel=${hdmodel#"Hitachi "} # Remove "Hitachi " from start of model name |
|
|
|
|
|
hdmodel=${hdmodel#"SAMSUNG "} # Remove "SAMSUNG " from start of model name |
|
|
|
|
|
hdmodel=${hdmodel#"FUJISTU "} # Remove "FUJISTU " from start of model name |
|
|
|
|
|
hdmodel=${hdmodel#"APPLE HDD "} # Remove "APPLE HDD " from start of model name |
|
|
|
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getdriveinfo() { |
|
|
getdriveinfo() { |
|
|
|