Browse Source
Update syno_hdd_db.sh
- Fixed bug where removable drives were being detected and added to drive database.
pull/14/head
007revad
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
15 additions and
9 deletions
-
syno_hdd_db.sh
|
|
|
@ -47,6 +47,8 @@ |
|
|
|
# |
|
|
|
# Changed checking drive_db_test_url setting to be more durable. |
|
|
|
# |
|
|
|
# Fixed bug where removable drives were being detected and added to drive database. |
|
|
|
# |
|
|
|
# |
|
|
|
# Added check that M.2 volume support is enabled (on supported models). |
|
|
|
# |
|
|
|
@ -263,6 +265,9 @@ fi |
|
|
|
# Get list of installed SATA, SAS and M.2 NVMe/SATA drives |
|
|
|
|
|
|
|
getdriveinfo() { |
|
|
|
# Skip removable drives (USB drives) |
|
|
|
removable=$(cat "$1/removable") |
|
|
|
if [[ $removable == "0" ]]; then |
|
|
|
# Get drive model and firmware version |
|
|
|
hdmodel=$(cat "$1/device/model") |
|
|
|
hdmodel=$(printf "%s" "$hdmodel" | xargs) # trim leading and trailing white space |
|
|
|
@ -273,6 +278,7 @@ getdriveinfo() { |
|
|
|
if [[ $hdmodel ]] && [[ $fwrev ]]; then |
|
|
|
hdlist+=("${hdmodel},${fwrev}") |
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
getm2info() { |
|
|
|
|