From 249a9262f222720abaab4cec0b747859bf6c7949 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Sun, 29 Dec 2024 04:19:13 +1100 Subject: [PATCH 1/2] Update CHANGES.txt --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 619bf05..3310192 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +v3.5.107 +- Bug fix for firmware version as "Found]" in db files. Issue #407 + v3.5.106 - Bug fix for when script is not located on a volume. Issue #397 From cda6a5641ceb3a660b2994b5475530a9ee6fa842 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Sun, 29 Dec 2024 04:19:57 +1100 Subject: [PATCH 2/2] Update syno_hdd_db.sh v3.5.107 - Bug fix for firmware version as "Found]" in db files. Issue #407 --- syno_hdd_db.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 8871ea4..6d11f97 100755 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -29,7 +29,7 @@ # /var/packages/StorageManager/target/ui/storage_panel.js -scriptver="v3.5.106" +scriptver="v3.5.107" script=Synology_HDD_db repo="007revad/Synology_HDD_db" scriptname=syno_hdd_db @@ -73,7 +73,7 @@ Options: DSM 7.2.1 already has WDDA disabled -p, --pcie Enable creating volumes on M2 in unknown PCIe adaptor -e, --email Disable colored text in output scheduler emails - -S, --ssd=DRIVE Enable write_mostly on internal HDDs so DSM primary + -S, --ssd=DRIVE Enable write_mostly on internal HDDs so DSM primarily reads from internal SSDs or your specified drives -S automatically sets internal SSDs as DSM preferred --ssd=DRIVE requires the fast drive(s) as argument, @@ -197,6 +197,7 @@ else fi +# shellcheck disable=SC2317 # Don't warn about unreachable commands in this function PS4func() { local lineno="$1" local i f='' @@ -956,10 +957,11 @@ getdriveinfo(){ # Account for SSD drives with spaces in their model name/number fwrev=$(/usr/syno/bin/syno_hdd_util --ssd_detect | grep "$device " | awk '{print $(NF-3)}') # GitHub issue #86, 87 - # Get M.2 SATA SSD firmware version + # Get firmware version with smartctl if $fwrev null + # for M.2 SATA SSD and Github issue #407 if [[ -z $fwrev ]]; then dev=/dev/"$(basename -- "$1")" - fwrev=$(smartctl -a -d sat -T permissive "$dev" | grep -i firmware | awk '{print $NF}') + fwrev=$(smartctl -a -d ata -T permissive "$dev" | grep -i firmware | awk '{print $NF}') fi # Get drive GB size