Browse Source

Merge pull request #18 from 007revad/develop

Added disable support memory compatibility option
pull/91/head v1.2.17
007revad 3 years ago
committed by GitHub
parent
commit
79159dae62
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGES.txt
  2. 14
      README.md
  3. 29
      syno_hdd_db.sh

3
CHANGES.txt

@ -1,3 +1,6 @@
v1.2.17
- Added disable support memory compatibility option --ram or -r
v1.2.16 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. - Changed to show the script version, Synology model and DSM version on each run to make it easier to debug any user's issues.

14
README.md

@ -19,6 +19,7 @@ #### What the script does:
* Adds any missing drives to the Synology's compatible-drive database. * Adds any missing drives to the Synology's compatible-drive database.
* Prevents DSM auto updating the drive database. * Prevents DSM auto updating the drive database.
* Optionally disable DSM's "support_disk_compatibility". * 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). * Checks that M.2 volume support is enabled (on supported models).
* Makes DSM recheck disk compatibility so rebooting is not needed (DSM 7 only). * 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). * 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 ### Options when running the script
There are 3 optional flags you can use when running the script: 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. * --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. * --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". * 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. * --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 ### Scheduling the script in Synology's Task Scheduler
@ -75,3 +78,4 @@ ### Running the script via SSH
- The idea for this script came from a comment made by Empyrealist on the Synology subreddit. - 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 for the assistance from Alex_of_Chaos on the Synology subreddit.
- Thanks to dwabraxus and aferende for help detecting connected expansion units. - 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.

29
syno_hdd_db.sh

@ -82,7 +82,7 @@
# Optionally disable "support_disk_compatibility". # Optionally disable "support_disk_compatibility".
scriptver="v1.2.16" scriptver="v1.2.17"
script=Synology_HDD_db script=Synology_HDD_db
repo="007revad/Synology_HDD_db" repo="007revad/Synology_HDD_db"
@ -150,8 +150,7 @@ if options="$(getopt -o abcdefghijklmnopqrstuvwxyz0123456789 -a \
force=yes force=yes
;; ;;
-r|--ram) # Include memory compatibility -r|--ram) # Include memory compatibility
# shellcheck disable=SC2034 ram=yes
ram=yes # for future use
;; ;;
-h|--help) # Show usage options -h|--help) # Show usage options
usage usage
@ -688,6 +687,30 @@ else
fi 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 # Enable m2 volume support
if [[ $m2 != "no" ]]; then if [[ $m2 != "no" ]]; then
if [[ $m2exists == "yes" ]]; then if [[ $m2exists == "yes" ]]; then

Loading…
Cancel
Save