From 558b3ad2446332109e98d83024c00ec721f43af0 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:08:24 +1100 Subject: [PATCH] Update syno_hdd_db.sh --- syno_hdd_db.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 59f0559..0d8cd0e 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -728,12 +728,14 @@ fi fixdrivemodel(){ # Remove " 00Y" from end of Samsung/Lenovo SSDs # Github issue #13 - if [[ $1 ]]; then + if [[ $1 =~ MZ.*" 00Y" ]]; + then hdmodel=$(printf "%s" "$1" | sed 's/ 00Y.*//') fi # Brands that return "BRAND " and need "BRAND " removed. - if [[ $1 ]]; then + 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