From 031f2688d1a8a141ae1a35aa7b2724530e7ae034 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Sat, 5 Aug 2023 06:38:19 +1000
Subject: [PATCH 1/4] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 339917e..3295698 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ #### What the script does:
* Adds any missing drives to the Synology's compatible-drive database.
* Prevents DSM auto updating the drive database.
* Optionally disable DSM's "support_disk_compatibility".
-* Optionally disable DSM's "support_memory_compatibility" to prevent non-Synology memory notifications.
+* Optionally disable DSM's "support_memory_compatibility" to prevent non-Synology memory notifications.
* Optionally edits max supported memory to match the amount of memory installed, if installed memory is greater than the current max memory setting.
* Enables M2D20, M2D18, M2D17 and E10M20-T1 if present on Synology NAS that don't officially support them.
* Checks that M.2 volume support is enabled (on models that have M.2 slots or PCIe slots).
From bc5e2040421ebc5421921f95c47fc70a42002fbc Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 22 Aug 2023 13:49:02 +1000
Subject: [PATCH 2/4] Update README.md
---
README.md | 30 ++++++++++++++++++++++++++----
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 3295698..acb119e 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ ### Download the script
### When to run the script
-You would need to re-run the script after a DSM update. If you have DSM set to auto update the best option is to run the script every time the Synology boots, and the best way to do that is to setup a scheduled task to run the the script at boot-up.
+You would need to re-run the script after a DSM update. If you have DSM set to auto update the best option is to run the script every time the Synology boots, and the best way to do that is to setup a scheduled task to run the the script at boot-up.
**Note:** After you first run the script you may need to reboot the Synology to see the effect of the changes.
@@ -101,6 +101,28 @@ ### Running the script via SSH
**Donators**
-- Thank you to Gummibando on reddit for their donation.
-- Thank you to the onimous donors.
-
+Thank you to the following paypal donators and GitHub sponsors
+
+- Bogdan-Stefan Rotariu
+- Kevin Boatswain
+- anschluss-org
+- Kyle Reid
+- Yemeth
+- Nick Dawson
+- Patrick Thomas
+- Manuel Marquez Corral
+- Evrard Franck
+- Chad Palmer
+- 侯永政
+- CHENHAN-YING
+- Eric Wells
+- Massimiliano Pesce
+- JasonEMartin
+- Kevin Boatswain
+- Gerrit Klussmann
+- Alain Aube
+- Robert Kraut
+- Charles-Edouard Poisnel
+- Oliver Busch
+- Gummibando
+- The onimous donors
From 4003f9fa094282b445f7d0e6a7ae6dfae9a61a69 Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 22 Aug 2023 22:14:15 +1000
Subject: [PATCH 3/4] Update CHANGES.txt
- Added support to disable unsupported memory warnings on DVA models.
---
CHANGES.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CHANGES.txt b/CHANGES.txt
index f9cdd41..f31d7ec 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,6 @@
+v3.1.63
+- Added support to disable unsupported memory warnings on DVA models.
+
v3.1.62
- Fixed bug where newly connected expansion units weren't found until up to 24 hours later. #124
From c29ed4101570ed5e58905251b118b4abeb24a82c Mon Sep 17 00:00:00 2001
From: Dave Russell <39733752+007revad@users.noreply.github.com>
Date: Tue, 22 Aug 2023 22:22:43 +1000
Subject: [PATCH 4/4] Update syno_hdd_db.sh
v3.1.63
- Added support to disable unsupported memory warnings on DVA models.
---
syno_hdd_db.sh | 68 +++++++++++++++++++++++++++++++++-----------------
1 file changed, 45 insertions(+), 23 deletions(-)
diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh
index 321aebc..ee7eb1c 100644
--- a/syno_hdd_db.sh
+++ b/syno_hdd_db.sh
@@ -29,6 +29,8 @@
# Change how synoinfo.conf is backed up and restored to prevent issue #73
# DONE
+# Added support to disable unsupported memory warnings on DVA models.
+#
# Fixed bug where newly connected expansion units weren't found until up to 24 hours later. #124
#
# Added enabling E10M20-T1, M2D20 and M2D18 for DS1821+, DS1621+ and DS1520+.
@@ -202,7 +204,7 @@
# Optionally disable "support_disk_compatibility".
-scriptver="v3.1.62"
+scriptver="v3.1.63"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
@@ -641,6 +643,14 @@ if [[ $restore == "yes" ]]; then
# Update .db files from Synology
syno_disk_db_update --update
+ # Enable SynoMemCheck.service for DVA models
+ if [[ ${model:0:3} == "dva" ]]; then
+ memcheck="/usr/lib/systemd/system/SynoMemCheck.service"
+ if [[ $(synogetkeyvalue "$memcheck" ExecStart) == "/bin/true" ]]; then
+ synosetkeyvalue "$memcheck" ExecStart /usr/syno/bin/syno_mem_check
+ fi
+ fi
+
if [[ -z $restoreerr ]]; then
echo -e "\nRestore successful."
fi
@@ -1004,6 +1014,7 @@ editcount(){
fi
}
+
editdb7(){
if [[ $1 == "append" ]]; then # model not in db file
#if sed -i "s/}}}/}},\"$hdmodel\":{$fwstrng$default/" "$2"; then # append
@@ -1255,6 +1266,7 @@ check_modeldtb(){
fi
}
+
for c in "${m2cards[@]}"; do
#echo ""
m2cardconf="/usr/syno/etc.defaults/adapter_cards.conf"
@@ -1330,30 +1342,40 @@ else
fi
-# Optionally disable "support_memory_compatibility"
-smc=support_memory_compatibility
-setting="$(get_key_value $synoinfo $smc)"
-if [[ $ram == "yes" ]]; then
- if [[ $setting == "yes" ]]; then
- # Disable support_memory_compatibility
- synosetkeyvalue "$synoinfo" "$smc" "no"
- setting="$(get_key_value "$synoinfo" $smc)"
+# Optionally disable "support_memory_compatibility" (not for DVA models)
+if [[ ${model:0:3} != "dva" ]]; then
+ smc=support_memory_compatibility
+ setting="$(get_key_value $synoinfo $smc)"
+ if [[ $ram == "yes" ]]; then
+ if [[ $setting == "yes" ]]; then
+ # Disable support_memory_compatibility
+ synosetkeyvalue "$synoinfo" "$smc" "no"
+ setting="$(get_key_value "$synoinfo" $smc)"
+ if [[ $setting == "no" ]]; then
+ echo -e "\nDisabled support memory compatibility."
+ fi
+ elif [[ $setting == "no" ]]; then
+ echo -e "\nSupport memory compatibility already disabled."
+ fi
+ else
if [[ $setting == "no" ]]; then
- echo -e "\nDisabled support memory compatibility."
+ # Enable support_memory_compatibility
+ synosetkeyvalue "$synoinfo" "$smc" "yes"
+ setting="$(get_key_value "$synoinfo" $smc)"
+ if [[ $setting == "yes" ]]; then
+ echo -e "\nRe-enabled support memory compatibility."
+ fi
+ elif [[ $setting == "yes" ]]; then
+ echo -e "\nSupport memory compatibility already enabled."
fi
- elif [[ $setting == "no" ]]; then
- echo -e "\nSupport memory compatibility already disabled."
fi
-else
- if [[ $setting == "no" ]]; then
- # Enable support_memory_compatibility
- synosetkeyvalue "$synoinfo" "$smc" "yes"
- setting="$(get_key_value "$synoinfo" $smc)"
- if [[ $setting == "yes" ]]; then
- echo -e "\nRe-enabled support memory compatibility."
- fi
- elif [[ $setting == "yes" ]]; then
- echo -e "\nSupport memory compatibility already enabled."
+fi
+
+# Optionally disable SynoMemCheck.service for DVA models
+if [[ ${model:0:3} == "dva" ]]; then
+ memcheck="/usr/lib/systemd/system/SynoMemCheck.service"
+ if [[ $(synogetkeyvalue "$memcheck" ExecStart) == "/usr/syno/bin/syno_mem_check" ]]; then
+ synosetkeyvalue "$memcheck" ExecStart /bin/true
fi
fi
@@ -1373,7 +1395,7 @@ if [[ $dsm -gt "6" ]]; then # DSM 6 as has no /proc/meminfo
bytes=$(printf %s "${array[num]}" | awk '{print $3}') # GitHub issue #86, 87
if [[ $ramsize =~ ^[0-9]+$ ]]; then # Check $ramsize is numeric # GitHub issue #86, 87
if [[ $bytes == "GB" ]]; then # DSM 7.2 dmidecode returned GB
- ramsize=$((ramsize * 1024)) # Convert to MB # GitHub issue #107
+ ramsize=$((ramsize * 1024)) # Convert to MB # GitHub issue #107
fi
if [[ $ramtotal ]]; then
ramtotal=$((ramtotal +ramsize))