Browse Source

Merge pull request #564 from 007revad/develop

Develop
pull/568/head v3.6.122
Dave Russell 2 months ago
committed by GitHub
parent
commit
1139da0ce3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      CHANGES.txt
  2. 15
      syno_hdd_db.sh

5
CHANGES.txt

@ -1,3 +1,8 @@
v3.6.122
- Bug fix for drive models with multiple consecutive spaces in model name. Issue #559
- Bug fix for nvme drives with multiple consecutive spaces in firmware version.
- Bug fix for options not working. Issue #559 and #563
v3.6.121 v3.6.121
- Added --reboot option to reboot the NAS after a DSM update where the build number has changed. - Added --reboot option to reboot the NAS after a DSM update where the build number has changed.
- Only needed if NVMe volume or PCIe card need a 2nd reboot after DSM update. - Only needed if NVMe volume or PCIe card need a 2nd reboot after DSM update.

15
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.6.121" scriptver="v3.6.122"
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
@ -116,9 +116,7 @@ args=("$@")
# Check for flags with getopt # Check for flags with getopt
if options="$(getopt -o SIabcdefghijklmnopqrstuvwxyz0123456789 -l \ if options="$(getopt -o SIabcdefghijklmnopqrstuvwxyz0123456789 -l \
ssd:,ihm,restore,showedits,noupdate,nodbupdate,m2,force,\ ssd:,ihm,restore,showedits,noupdate,nodbupdate,m2,force,incompatible,ram,pcie,wdda,email,autoupdate:,reboot,help,version,debug -- "$@")"; then
incompatible,ram,pcie,wdda,email,autoupdate:,reboot,help,version,debug \
-- "$@")"; then
eval set -- "$options" eval set -- "$options"
while true; do while true; do
case "$1" in case "$1" in
@ -1026,7 +1024,8 @@ getdriveinfo(){
# Get drive model # Get drive model
hdmodel=$(cat "$1/device/model") hdmodel=$(cat "$1/device/model")
hdmodel=$(printf "%s" "$hdmodel" | xargs) # trim leading and trailing white space #hdmodel=$(printf "%s" "$hdmodel" | xargs) # trim leading and trailing white space (also replaces multiple spaces in model with 1 space)
hdmodel="$(printf "%s" "$hdmodel" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" # trim leading and trailing white space
# Fix dodgy model numbers # Fix dodgy model numbers
fixdrivemodel "$hdmodel" fixdrivemodel "$hdmodel"
@ -1066,13 +1065,15 @@ getdriveinfo(){
getm2info(){ getm2info(){
# $1 is /sys/block/nvme0n1 etc # $1 is /sys/block/nvme0n1 etc
nvmemodel=$(cat "$1/device/model") nvmemodel=$(cat "$1/device/model")
nvmemodel=$(printf "%s" "$nvmemodel" | xargs) # trim leading and trailing white space #nvmemodel=$(printf "%s" "$nvmemodel" | xargs) # trim leading and trailing white space (also replaces multiple spaces in model with 1 space)
nvmemodel="$(printf "%s" "$nvmemodel" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" # trim leading and trailing white space
if [[ $2 == "nvme" ]]; then if [[ $2 == "nvme" ]]; then
nvmefw=$(cat "$1/device/firmware_rev") nvmefw=$(cat "$1/device/firmware_rev")
elif [[ $2 == "nvc" ]]; then elif [[ $2 == "nvc" ]]; then
nvmefw=$(cat "$1/device/rev") nvmefw=$(cat "$1/device/rev")
fi fi
nvmefw=$(printf "%s" "$nvmefw" | xargs) # trim leading and trailing white space #nvmefw=$(printf "%s" "$nvmefw" | xargs) # trim leading and trailing white space (also replaces multiple spaces in model with 1 space)
nvmefw="$(printf "%s" "$nvmefw" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" # trim leading and trailing white space
# Get drive GB size # Get drive GB size
size_gb=$(get_size_gb "$1") size_gb=$(get_size_gb "$1")

Loading…
Cancel
Save