Browse Source

Update syno_hdd_db.sh

- Fixed bug where expansion units ending in RP or II were not detected.
pull/63/head
Dave Russell 3 years ago
committed by GitHub
parent
commit
af55b3dab3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      syno_hdd_db.sh

6
syno_hdd_db.sh

@ -30,6 +30,8 @@
# It's also parsed and checked and probably in some cases it could be more critical to patch that one instead. # It's also parsed and checked and probably in some cases it could be more critical to patch that one instead.
# DONE # DONE
# Fixed bug where expansion units ending in RP or II were not detected.
#
# Added a --restore option to undo all changes. # Added a --restore option to undo all changes.
# #
# Now looks for and edits both v7 and non-v7 db files to solve issue #11 for RS '21 models running DSM 6.2.4. # Now looks for and edits both v7 and non-v7 db files to solve issue #11 for RS '21 models running DSM 6.2.4.
@ -137,7 +139,7 @@
# Optionally disable "support_disk_compatibility". # Optionally disable "support_disk_compatibility".
scriptver="v2.2.40" scriptver="v2.2.41"
script=Synology_HDD_db script=Synology_HDD_db
repo="007revad/Synology_HDD_db" repo="007revad/Synology_HDD_db"
@ -686,7 +688,7 @@ fi
path="/var/log/diskprediction" path="/var/log/diskprediction"
# shellcheck disable=SC2012 # shellcheck disable=SC2012
file=$(ls $path | tail -n1) file=$(ls $path | tail -n1)
eunitlist=($(grep -Eow "([FRD]XD?[0-9]{3,4})(RP|II|sas){0,2}" "$path/$file" | uniq)) eunitlist=($(grep -Eowi "([FRD]XD?[0-9]{3,4})(rp|ii|sas){0,2}" "$path/$file" | uniq))
# Sort eunitlist array into new eunits array to remove duplicates # Sort eunitlist array into new eunits array to remove duplicates
if [[ ${#eunitlist[@]} -gt "0" ]]; then if [[ ${#eunitlist[@]} -gt "0" ]]; then

Loading…
Cancel
Save