Browse Source

Merge pull request #20 from 007revad/develop

Develop
pull/91/head
007revad 3 years ago
committed by GitHub
parent
commit
79480ce363
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGES.txt
  2. 9
      README.md
  3. BIN
      images/syno_hdd_db1.png
  4. BIN
      images/syno_hdd_db_help.png
  5. 14
      syno_hdd_db.sh

3
CHANGES.txt

@ -1,3 +1,6 @@
v2.2.18
- Minor shell output formatting fix.
v1.2.17
- Added disable support memory compatibility option --ram or -r

9
README.md

@ -41,13 +41,16 @@ ### When to run the script
### Options when running the script
There are 4 optional flags you can use when running the script:
There are 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.
* --noupdate or -n to prevent DSM updating the compatible drive databases.
* --m2 or -m to prevent processing M.2 drives.
* --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".
* --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.
<p align="leftr"><img src="images/syno_hdd_db_help.png"></p>
### Scheduling the script in Synology's Task Scheduler
@ -63,7 +66,7 @@ ### Running the script via SSH
**Note:** Replace /path-to-script/ with the actual path to the script on your Synology.
<p align="leftr"><img src="images/syno_hdd_db2.png"></p>
<p align="leftr"><img src="images/syno_hdd_db1.png"></p>
If you run the script with the -showedits flag it will show you the changes it made to the Synology's compatible-drive database. Obviously this is only useful if you run the script in a shell.

BIN
images/syno_hdd_db1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
images/syno_hdd_db_help.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

14
syno_hdd_db.sh

@ -29,6 +29,8 @@
# It's also parsed and checked and probably in some cases it could be more critical to patch that one instead.
# DONE
# Added option to disable incompatible memory notifications.
#
# Now finds your expansion units' model numbers and adds your drives to their db files.
#
# Now adds your M.2 drives to your M.2 PCI cards db files (M2Dxx and E10M20-T1 and future models).
@ -82,7 +84,7 @@
# Optionally disable "support_disk_compatibility".
scriptver="v1.2.17"
scriptver="v1.2.18"
script=Synology_HDD_db
repo="007revad/Synology_HDD_db"
@ -149,7 +151,7 @@ if options="$(getopt -o abcdefghijklmnopqrstuvwxyz0123456789 -a \
-f|--force) # Disable "support_disk_compatibility"
force=yes
;;
-r|--ram) # Include memory compatibility
-r|--ram) # Disable "support_memory_compatibility"
ram=yes
;;
-h|--help) # Show usage options
@ -514,6 +516,9 @@ getdbtype(){
backupdb() {
# Backup database file if needed
if [[ ! -f "$1.bak" ]]; then
if [[ $(basename "$1") == "synoinfo.conf" ]]; then
echo "" >&2
fi
if cp "$1" "$1.bak"; then
echo -e "Backed up $(basename -- "${1}")" >&2
else
@ -660,7 +665,6 @@ done
# Edit /etc.defaults/synoinfo.conf
# Backup synoinfo.conf if needed
echo ""
backupdb "$synoinfo" || exit 9
# Optionally disable "support_disk_compatibility"
@ -736,7 +740,7 @@ if [[ $m2 != "no" ]]; then
if [[ $setting == "yes" ]]; then
echo -e "\nEnabled M.2 volume support."
else
echo -e "${Error}ERROR${Off} Failed to enable m2 volume support!"
echo -e "\n${Error}ERROR${Off} Failed to enable m2 volume support!"
fi
fi
fi
@ -764,7 +768,7 @@ if [[ $nodbupdate == "yes" ]]; then
if [[ $url == "127.0.0.1" ]]; then
echo -e "\nDisabled drive db auto updates."
else
echo -e "${Error}ERROR${Off} Failed to disable drive db auto updates!"
echo -e "\n${Error}ERROR${Off} Failed to disable drive db auto updates!"
fi
fi
else

Loading…
Cancel
Save