Browse Source

Update syno_hdd_db.sh

pull/90/head
Dave Russell 3 years ago
committed by GitHub
parent
commit
6e96d4e6d1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      syno_hdd_db.sh

10
syno_hdd_db.sh

@ -28,6 +28,8 @@
# Solve issue of --restore option restoring files that were backed up with older DSM version.
# DONE
# Changed help to show -r, --ram also sets max memory to the amount of installed memory.
#
# Changed the "No M.2 cards found" to "No M.2 PCIe cards found" to make it clearer.
#
# Added "You may need to reboot" message when NVMe drives were detected.
@ -176,7 +178,7 @@
# Optionally disable "support_disk_compatibility".
scriptver="v2.3.52"
scriptver="v2.3.53"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
@ -216,7 +218,8 @@ Options:
-n, --noupdate Prevent DSM updating the compatible drive databases
-m, --m2 Don't process M.2 drives
-f, --force Force DSM to not check drive compatibility
-r, --ram Disable memory compatibility checking (DSM 7.x only)
-r, --ram Disable memory compatibility checking (DSM 7.x only),
and sets max memory to the amount of installed memory
-w, --wdda Disable WD WDDA
--restore Undo all changes made by the script
--autoupdate=AGE Auto update script (useful when script is scheduled)
@ -1169,6 +1172,8 @@ if [[ $dsm -gt "6" ]]; then # DSM 6 as has no /proc/meminfo
if [[ ${#array[@]} -gt "0" ]]; then
num="0"
while [[ $num -lt "${#array[@]}" ]]; do
check=$(printf %s "${array[num]}" | awk '{print $1}')
if [[ ${check,,} == "size:" ]]; then
#ramsize=$(printf %s "${array[num]}" | cut -d" " -f2)
ramsize=$(printf %s "${array[num]}" | awk '{print $2}') # GitHub issue #86, 87
bytes=$(printf %s "${array[num]}" | awk '{print $3}') # GitHub issue #86, 87
@ -1181,6 +1186,7 @@ if [[ $dsm -gt "6" ]]; then # DSM 6 as has no /proc/meminfo
else
echo -e "\n${Error}ERROR${Off} Memory size is not numeric: '$ramsize'"
fi
fi
num=$((num +1))
done
fi

Loading…
Cancel
Save