Browse Source

Merge pull request #96 from 007revad/develop

Develop
pull/102/head v3.0.56
Dave Russell 3 years ago
committed by GitHub
parent
commit
7f7f707483
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGES.txt
  2. 19
      syno_hdd_db.sh

3
CHANGES.txt

@ -1,3 +1,6 @@
v3.0.56
- Minor bug fix for checking amount of installed memory.
v3.0.55 v3.0.55
- Now enables any installed Synology M.2 PCIe cards for models that don't officially support them. - Now enables any installed Synology M.2 PCIe cards for models that don't officially support them.
- You can use a M2D20, M2D18, M2D17 or E10M20-T1 on any model with a PCIe slot (not Mini PCIe). - You can use a M2D20, M2D18, M2D17 or E10M20-T1 on any model with a PCIe slot (not Mini PCIe).

19
syno_hdd_db.sh

@ -28,6 +28,9 @@
# Solve issue of --restore option restoring files that were backed up with older DSM version. # Solve issue of --restore option restoring files that were backed up with older DSM version.
# DONE # DONE
# Minor bug fix for checking amount of installed memory.
#
#
# Now enables any installed Synology M.2 PCIe cards for models that don't officially support them. # Now enables any installed Synology M.2 PCIe cards for models that don't officially support them.
# #
# Added -i, --immutable option to enable immutable snapshots on models older than '20 series running DSM 7.2. # Added -i, --immutable option to enable immutable snapshots on models older than '20 series running DSM 7.2.
@ -185,7 +188,7 @@
# Optionally disable "support_disk_compatibility". # Optionally disable "support_disk_compatibility".
scriptver="v3.0.55" scriptver="v3.0.56"
script=Synology_HDD_db script=Synology_HDD_db
repo="007revad/Synology_HDD_db" repo="007revad/Synology_HDD_db"
@ -1244,8 +1247,8 @@ if [[ $dsm -gt "6" ]]; then # DSM 6 as has no /proc/meminfo
else else
ramtotal="$ramsize" ramtotal="$ramsize"
fi fi
else #else
echo -e "\n${Error}ERROR${Off} Memory size is not numeric: '$ramsize'" # echo -e "\n${Error}ERROR${Off} Memory size is not numeric: '$ramsize'"
fi fi
fi fi
num=$((num +1)) num=$((num +1))
@ -1253,9 +1256,9 @@ if [[ $dsm -gt "6" ]]; then # DSM 6 as has no /proc/meminfo
fi fi
# Set mem_max_mb to the amount of installed memory # Set mem_max_mb to the amount of installed memory
setting="$(get_key_value $synoinfo mem_max_mb)" setting="$(get_key_value $synoinfo mem_max_mb)"
if [[ $ramtotal =~ ^[0-9]+$ ]]; then # Check $ramtotal is numeric if [[ $ramtotal =~ ^[0-9]+$ ]]; then # Check $ramtotal is numeric
if [[ $bytes == "GB" ]]; then # DSM 7.2 dmidecode returns GB if [[ $bytes == "GB" ]]; then # DSM 7.2 dmidecode returns GB
ramtotal=$((ramtotal * 1024)) # Convert to MB ramtotal=$((ramtotal * 1024)) # Convert to MB
fi fi
if [[ $ramtotal -gt $setting ]]; then if [[ $ramtotal -gt $setting ]]; then
synosetkeyvalue "$synoinfo" mem_max_mb "$ramtotal" synosetkeyvalue "$synoinfo" mem_max_mb "$ramtotal"
@ -1272,6 +1275,10 @@ if [[ $dsm -gt "6" ]]; then # DSM 6 as has no /proc/meminfo
#echo -e "\nMax memory already set to $ramtotal MB." #echo -e "\nMax memory already set to $ramtotal MB."
ramgb=$((ramtotal / 1024)) ramgb=$((ramtotal / 1024))
echo -e "\nMax memory already set to $ramgb GB." echo -e "\nMax memory already set to $ramgb GB."
else [[ $setting -lt "$ramtotal" ]]
#echo -e "\nMax memory is set to $ramtotal MB."
ramgb=$((ramtotal / 1024))
echo -e "\nMax memory is set to $ramgb GB."
fi fi
else else
echo -e "\n${Error}ERROR${Off} Total memory size is not numeric: '$ramtotal'" echo -e "\n${Error}ERROR${Off} Total memory size is not numeric: '$ramtotal'"

Loading…
Cancel
Save