Browse Source
Update syno_hdd_db.sh
Minor bug fix for checking amount of installed memory.
pull/96/head
Dave Russell
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
13 additions and
6 deletions
-
syno_hdd_db.sh
|
|
|
@ -28,6 +28,9 @@ |
|
|
|
# Solve issue of --restore option restoring files that were backed up with older DSM version. |
|
|
|
|
|
|
|
# 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. |
|
|
|
# |
|
|
|
# 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". |
|
|
|
|
|
|
|
|
|
|
|
scriptver="v3.0.55" |
|
|
|
scriptver="v3.0.56" |
|
|
|
script=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 |
|
|
|
ramtotal="$ramsize" |
|
|
|
fi |
|
|
|
else |
|
|
|
echo -e "\n${Error}ERROR${Off} Memory size is not numeric: '$ramsize'" |
|
|
|
#else |
|
|
|
# echo -e "\n${Error}ERROR${Off} Memory size is not numeric: '$ramsize'" |
|
|
|
fi |
|
|
|
fi |
|
|
|
num=$((num +1)) |
|
|
|
@ -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." |
|
|
|
ramgb=$((ramtotal / 1024)) |
|
|
|
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 |
|
|
|
else |
|
|
|
echo -e "\n${Error}ERROR${Off} Total memory size is not numeric: '$ramtotal'" |
|
|
|
|