From 10efea01fda6f3ff38d5c6b1b8f462152343e197 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:09:02 +1100 Subject: [PATCH 1/5] Update CHANGES.txt Bug for fix for when -s or --showedits option was used. --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index a884ae9..228c641 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,8 +1,9 @@ -v3.3.75 +v3.4.76 - Include smart_test_ignore and smart_attr_ignore in db files. - Now saves changes.txt as _changes.txt when updating the script. - To not overwrite changes.txt if my other scripts are in the same folder. - Bug fix for detecting if script is located on M.2 drive. +- Bug fix that caused error when -s or --shoedits option was used. - Minor bug fix. v3.3.73 From e6b14959a4395bf249b1900e39556939b8722923 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:16:11 +1100 Subject: [PATCH 2/5] Update CHANGES.txt --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 228c641..4ed165e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,7 +3,7 @@ v3.4.76 - Now saves changes.txt as _changes.txt when updating the script. - To not overwrite changes.txt if my other scripts are in the same folder. - Bug fix for detecting if script is located on M.2 drive. -- Bug fix that caused error when -s or --shoedits option was used. +- Bug fix that caused error when -s or --shoedits option was used. Issue #200 - Minor bug fix. v3.3.73 From 421937a1ebb4ecd75930083335687c6762a29f8c Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:16:58 +1100 Subject: [PATCH 3/5] Update CHANGES.txt - Bug fix for error when -s or --shoedits option was used. Issue #200 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 4ed165e..7e65d9a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,7 +3,7 @@ v3.4.76 - Now saves changes.txt as _changes.txt when updating the script. - To not overwrite changes.txt if my other scripts are in the same folder. - Bug fix for detecting if script is located on M.2 drive. -- Bug fix that caused error when -s or --shoedits option was used. Issue #200 +- Bug fix for error when -s or --shoedits option was used. Issue #200 - Minor bug fix. v3.3.73 From e045f9005acd12752eb21ff48bc50829470b0a8f Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:17:13 +1100 Subject: [PATCH 4/5] Update CHANGES.txt - Bug fix for error when -s or --showedits option was used. Issue #200 --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 7e65d9a..37fe6d3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,7 +3,7 @@ v3.4.76 - Now saves changes.txt as _changes.txt when updating the script. - To not overwrite changes.txt if my other scripts are in the same folder. - Bug fix for detecting if script is located on M.2 drive. -- Bug fix for error when -s or --shoedits option was used. Issue #200 +- Bug fix for error when -s or --showedits option was used. Issue #200 - Minor bug fix. v3.3.73 From c3e1f15dba4cde3f45ac59b81263a905c5426c26 Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:17:27 +1100 Subject: [PATCH 5/5] Update syno_hdd_db.sh - Bug fix for error when -s or --showedits option was used. Issue #200 --- syno_hdd_db.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index a650005..7fde39c 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -27,7 +27,7 @@ # Now warns if script is located on an M.2 volume. -scriptver="v3.3.75" +scriptver="v3.4.76" script=Synology_HDD_db repo="007revad/Synology_HDD_db" scriptname=syno_hdd_db @@ -633,6 +633,7 @@ vendor_from_id(){ # Vendor ids missing in /usr/syno/etc.defaults/pci_vendor_ids.conf # $1 is vendor id # https://devicehunt.com/all-pci-vendors + # https://pci-ids.ucw.cz/ vendor="" case "${1,,}" in 0x10ec) vendor=TEAMGROUP ;; @@ -1130,7 +1131,7 @@ updatedb(){ default=\"default\" default="$default":{\"compatibility_interval\":[{\"compatibility\":\"support\",\"not_yet_rolling_status\" default="$default":\"support\",\"fw_dsm_update_status_notify\":false,\"barebone_installable\":true, - default="$default"\"smart_test_ignore\":false,\"smart_attr_ignore\":false}]}}}, + default="$default"\"smart_test_ignore\":false,\"smart_attr_ignore\":false}]}}} if grep '"disk_compatbility_info":{}' "$2" >/dev/null; then # Replace "disk_compatbility_info":{} with @@ -1176,6 +1177,18 @@ updatedb(){ } +# Fix ,, instead of , bug caused by v3.3.75 +if [[ "${#db1list[@]}" -gt "0" ]]; then + for i in "${!db1list[@]}"; do + sed -i "s/,,/,/" + done +fi +if [[ "${#db2list[@]}" -gt "0" ]]; then + for i in "${!db2list[@]}"; do + sed -i "s/,,/,/" + done +fi + # HDDs and SATA SSDs num="0" while [[ $num -lt "${#hdds[@]}" ]]; do