Browse Source

Merge pull request #359 from 007revad/develop

Develop
pull/360/head v3.5.102
Dave Russell 1 year ago
committed by GitHub
parent
commit
dbe7acec30
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGES.txt
  2. 12
      syno_hdd_db.sh

4
CHANGES.txt

@ -1,3 +1,7 @@
v3.5.102
- Changed to use a faster method of detecting if an expansion unit is connected, for models with the syno_slot_mapping command.
- Changed so XPE users using the hdddb addon don't need to reboot.
v3.5.101 v3.5.101
- Changed to support "--restore --ssd=restore" to restore write_mostly when restoring all other changes. Issue #340 - Changed to support "--restore --ssd=restore" to restore write_mostly when restoring all other changes. Issue #340
- When using --restore you can also use --ssd=restore, -e or --email - When using --restore you can also use --ssd=restore, -e or --email

12
syno_hdd_db.sh

@ -29,7 +29,7 @@
# /var/packages/StorageManager/target/ui/storage_panel.js # /var/packages/StorageManager/target/ui/storage_panel.js
scriptver="v3.5.101" scriptver="v3.5.102"
script=Synology_HDD_db script=Synology_HDD_db
repo="007revad/Synology_HDD_db" repo="007revad/Synology_HDD_db"
scriptname=syno_hdd_db scriptname=syno_hdd_db
@ -1150,6 +1150,13 @@ fi
# Expansion units # Expansion units
# eSATA and InfiniBand ports both appear in syno_slot_mapping as:
# Esata port count: 1
# Eunit port 1 - RX1214
# Only device tree models have syno_slot_mapping
if which syno_slot_mapping >/dev/null; then
eunitlist=($(syno_slot_mapping | grep 'Eunit port' | awk '{print $5}'))
else
# Create new /var/log/diskprediction log to ensure newly connected ebox is in latest log # Create new /var/log/diskprediction log to ensure newly connected ebox is in latest log
# Otherwise the new /var/log/diskprediction log is only created a midnight. # Otherwise the new /var/log/diskprediction log is only created a midnight.
/usr/syno/bin/syno_disk_data_collector record /usr/syno/bin/syno_disk_data_collector record
@ -1159,6 +1166,7 @@ path="/var/log/diskprediction"
# shellcheck disable=SC2012 # shellcheck disable=SC2012
file=$(ls $path | tail -n1) file=$(ls $path | tail -n1)
eunitlist=($(grep -Eowi "([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))
fi
# 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
@ -2095,10 +2103,12 @@ if [[ $nodbupdate == "yes" ]]; then
# Add drive_db_test_url="127.0.0.1" # Add drive_db_test_url="127.0.0.1"
#echo 'drive_db_test_url="127.0.0.1"' >> "$synoinfo" #echo 'drive_db_test_url="127.0.0.1"' >> "$synoinfo"
/usr/syno/bin/synosetkeyvalue "$synoinfo" "$dtu" "127.0.0.1" /usr/syno/bin/synosetkeyvalue "$synoinfo" "$dtu" "127.0.0.1"
[ -d /tmpRoot ] && /tmpRoot/usr/syno/bin/synosetkeyvalue /tmpRoot/etc.defaults/synoinfo.conf "$dtu" "127.0.0.1"
disabled="yes" disabled="yes"
elif [[ $url != "127.0.0.1" ]]; then elif [[ $url != "127.0.0.1" ]]; then
# Edit drive_db_test_url= # Edit drive_db_test_url=
/usr/syno/bin/synosetkeyvalue "$synoinfo" "$dtu" "127.0.0.1" /usr/syno/bin/synosetkeyvalue "$synoinfo" "$dtu" "127.0.0.1"
[ -d /tmpRoot ] && /tmpRoot/usr/syno/bin/synosetkeyvalue /tmpRoot/etc.defaults/synoinfo.conf "$dtu" "127.0.0.1"
disabled="yes" disabled="yes"
fi fi

Loading…
Cancel
Save