Browse Source

Update syno_hdd_db.sh

- Added support for M.2 SATA drives.
- Can now skip processing M.2 drives by running script with the -m2 flag.
- Changed method of getting drive and firmware version so script is faster and easier to maintain. No longer using smartctl or hdparm.
- Changed SAS drive firmware version detection to support SAS drives that hdparm doesn't work with.
- Removed error message and aborting if *.db.new not found (clean DSM installs don't have a *.db.new).
- Fixed script version check introduced in 1.0.7.
develop
007revad 3 years ago
committed by GitHub
parent
commit
9df855b69f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      syno_hdd_db.sh

8
syno_hdd_db.sh

@ -62,7 +62,7 @@
# Optionally disable "support_disk_compatibility". # Optionally disable "support_disk_compatibility".
scriptver="1.1.10" scriptver="1.1.11"
# Check latest release with GitHub API # Check latest release with GitHub API
get_latest_release() { get_latest_release() {
@ -450,8 +450,7 @@ if [[ ${showedits,,} == "yes" ]]; then
if [[ $db1Edits -gt "0" ]]; then if [[ $db1Edits -gt "0" ]]; then
echo -e "\nChanges to ${Cyan}$(basename -- "$db1")${Off}" echo -e "\nChanges to ${Cyan}$(basename -- "$db1")${Off}"
jq . "$db1" | tail -n "$lines" jq . "$db1" | tail -n "$lines"
fi elif [[ $db2Edits -gt "0" ]]; then
if [[ $db2Edits -gt "0" ]]; then
echo -e "\nChanges to ${Cyan}$(basename -- "$db2")${Off}" echo -e "\nChanges to ${Cyan}$(basename -- "$db2")${Off}"
jq . "$db2" | tail -n "$lines" jq . "$db2" | tail -n "$lines"
fi fi
@ -461,8 +460,7 @@ if [[ ${showedits,,} == "yes" ]]; then
if [[ $db1Edits -gt "0" ]]; then if [[ $db1Edits -gt "0" ]]; then
echo -e "\nChanges to ${Cyan}$(basename -- "$db1")${Off}" echo -e "\nChanges to ${Cyan}$(basename -- "$db1")${Off}"
jq . "$db1" | head -n "$lines" jq . "$db1" | head -n "$lines"
fi elif [[ $db2Edits -gt "0" ]]; then
if [[ $db2Edits -gt "0" ]]; then
echo -e "\nChanges to ${Cyan}$(basename -- "$db2")${Off}" echo -e "\nChanges to ${Cyan}$(basename -- "$db2")${Off}"
jq . "$db2" | head -n "$lines" jq . "$db2" | head -n "$lines"
fi fi

Loading…
Cancel
Save