Browse Source

Update syno_hdd_db.sh

v3.1.63
- Added support to disable unsupported memory warnings on DVA models.
pull/137/head
Dave Russell 2 years ago
committed by GitHub
parent
commit
c29ed41015
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      syno_hdd_db.sh

26
syno_hdd_db.sh

@ -29,6 +29,8 @@
# Change how synoinfo.conf is backed up and restored to prevent issue #73 # Change how synoinfo.conf is backed up and restored to prevent issue #73
# DONE # 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 # 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+. # Added enabling E10M20-T1, M2D20 and M2D18 for DS1821+, DS1621+ and DS1520+.
@ -202,7 +204,7 @@
# Optionally disable "support_disk_compatibility". # Optionally disable "support_disk_compatibility".
scriptver="v3.1.62" scriptver="v3.1.63"
script=Synology_HDD_db script=Synology_HDD_db
repo="007revad/Synology_HDD_db" repo="007revad/Synology_HDD_db"
@ -641,6 +643,14 @@ if [[ $restore == "yes" ]]; then
# Update .db files from Synology # Update .db files from Synology
syno_disk_db_update --update 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 if [[ -z $restoreerr ]]; then
echo -e "\nRestore successful." echo -e "\nRestore successful."
fi fi
@ -1004,6 +1014,7 @@ editcount(){
fi fi
} }
editdb7(){ editdb7(){
if [[ $1 == "append" ]]; then # model not in db file if [[ $1 == "append" ]]; then # model not in db file
#if sed -i "s/}}}/}},\"$hdmodel\":{$fwstrng$default/" "$2"; then # append #if sed -i "s/}}}/}},\"$hdmodel\":{$fwstrng$default/" "$2"; then # append
@ -1255,6 +1266,7 @@ check_modeldtb(){
fi fi
} }
for c in "${m2cards[@]}"; do for c in "${m2cards[@]}"; do
#echo "" #echo ""
m2cardconf="/usr/syno/etc.defaults/adapter_cards.conf" m2cardconf="/usr/syno/etc.defaults/adapter_cards.conf"
@ -1330,7 +1342,8 @@ else
fi fi
# Optionally disable "support_memory_compatibility" # Optionally disable "support_memory_compatibility" (not for DVA models)
if [[ ${model:0:3} != "dva" ]]; then
smc=support_memory_compatibility smc=support_memory_compatibility
setting="$(get_key_value $synoinfo $smc)" setting="$(get_key_value $synoinfo $smc)"
if [[ $ram == "yes" ]]; then if [[ $ram == "yes" ]]; then
@ -1356,6 +1369,15 @@ else
echo -e "\nSupport memory compatibility already enabled." echo -e "\nSupport memory compatibility already enabled."
fi fi
fi fi
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
# Optionally set mem_max_mb to the amount of installed memory # Optionally set mem_max_mb to the amount of installed memory
if [[ $dsm -gt "6" ]]; then # DSM 6 as has no /proc/meminfo if [[ $dsm -gt "6" ]]; then # DSM 6 as has no /proc/meminfo

Loading…
Cancel
Save