From ff68a283641bc68a9bee874ee3703481c1e0746e Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Mon, 20 Mar 2023 17:13:14 +1100 Subject: [PATCH 1/4] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1f70dc4..e41c79d 100644 --- a/README.md +++ b/README.md @@ -75,3 +75,4 @@ ### Running the script via SSH - The idea for this script came from a comment made by Empyrealist on the Synology subreddit. - Thanks for the assistance from Alex_of_Chaos on the Synology subreddit. - Thanks to dwabraxus and aferende for help detecting connected expansion units. +- Thanks to bartoque on the Synology subreddit for the tip on making the script download the latest release from github. From 9ca604f70f31bfe081bcf7fdd3fb2527bda50408 Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Tue, 21 Mar 2023 04:11:24 +1100 Subject: [PATCH 2/4] Update syno_hdd_db.sh Added disable support memory compatibility option --ram or -r --- syno_hdd_db.sh | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index a69b304..a1ca942 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -82,7 +82,7 @@ # Optionally disable "support_disk_compatibility". -scriptver="v1.2.16" +scriptver="v1.2.17" script=Synology_HDD_db repo="007revad/Synology_HDD_db" @@ -150,8 +150,7 @@ if options="$(getopt -o abcdefghijklmnopqrstuvwxyz0123456789 -a \ force=yes ;; -r|--ram) # Include memory compatibility - # shellcheck disable=SC2034 - ram=yes # for future use + ram=yes ;; -h|--help) # Show usage options usage @@ -688,6 +687,30 @@ 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 + sed -i "s/${smc}=\"yes\"/${smc}=\"no\"/" "$synoinfo" + setting="$(get_key_value "$synoinfo" $smc)" + if [[ $setting == "no" ]]; then + echo -e "\nDisabled support memory compatibility." + fi + fi +else + if [[ $setting == "no" ]]; then + # Enable support_memory_compatibility + sed -i "s/${smc}=\"no\"/${smc}=\"yes\"/" "$synoinfo" + setting="$(get_key_value "$synoinfo" $smc)" + if [[ $setting == "yes" ]]; then + echo -e "\nRe-enabled support memory compatibility." + fi + fi +fi + + # Enable m2 volume support if [[ $m2 != "no" ]]; then if [[ $m2exists == "yes" ]]; then From 5585f174967ce3fd8d0ae19f266a8dc9849cbc5f Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Tue, 21 Mar 2023 04:12:26 +1100 Subject: [PATCH 3/4] Update CHANGES.txt Added disable support memory compatibility option --ram or -r --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 9363b15..4245934 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +v1.2.17 +- Added disable support memory compatibility option --ram or -r + v1.2.16 - Changed to show the script version, Synology model and DSM version on each run to make it easier to debug any user's issues. From 8ea79288cb47da9930134efe442ba331cb8d4600 Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Tue, 21 Mar 2023 04:18:13 +1100 Subject: [PATCH 4/4] Update README.md Added disable support memory compatibility option --ram or -r --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e41c79d..7d51b7c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,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". * Checks that M.2 volume support is enabled (on supported models). * Makes DSM recheck disk compatibility so rebooting is not needed (DSM 7 only). * Reminds you that you may need to reboot the Synology after running the script (DSM 6 only). @@ -38,11 +39,13 @@ ### When to run the script ### Options when running the script -There are 3 optional flags you can use when running the script: -* -showedits or -s to show you the changes it made to the Synology's compatible-drive database. -* -force or -f to disable "support_disk_compatibility". This should be needed if any of your drives weren't detected. - * If you run the script without -force or -f it will re-eanble "support_disk_compatibility". -* -m2 or -m to prevent processing M.2 drives. +There are 4 optional flags you can use when running the script: +* --showedits or -s to show you the changes it made to the Synology's compatible-drive database. +* --force or -f to disable "support_disk_compatibility". This should only be needed if any of your drives weren't detected. + * If you run the script without --force or -f it will re-eanble "support_disk_compatibility". +* --ram or -r to disable "support_memory_compatibility". + * If you run the script without --ram or -r it will re-eanble "support_memory_compatibility". +* --m2 or -m to prevent processing M.2 drives. ### Scheduling the script in Synology's Task Scheduler