Browse Source
Update syno_hdd_db.sh
Fixed bug where "M.2 volume support already enabled" message appeared when NAS had no M.2 drives.
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
40 additions and
32 deletions
-
syno_hdd_db.sh
|
|
|
@ -49,6 +49,8 @@ |
|
|
|
# |
|
|
|
# Fixed bug where removable drives were being detected and added to drive database. |
|
|
|
# |
|
|
|
# Fixed bug where "M.2 volume support already enabled" message appeared when NAS had no M.2 drives. |
|
|
|
# |
|
|
|
# |
|
|
|
# Added check that M.2 volume support is enabled (on supported models). |
|
|
|
# |
|
|
|
@ -380,11 +382,11 @@ if [[ ${#nvmelist[@]} -gt "0" ]]; then |
|
|
|
fi |
|
|
|
|
|
|
|
# Check nvmes array isn't empty |
|
|
|
if [[ ${#nvmes[@]} -eq "0" ]]; then |
|
|
|
if [[ $m2 != "no" ]]; then |
|
|
|
if [[ ${#nvmes[@]} -eq "0" ]]; then |
|
|
|
echo -e "No M.2 drives found\n" |
|
|
|
fi |
|
|
|
else |
|
|
|
m2exists="yes" |
|
|
|
echo "M.2 drive models found: ${#nvmes[@]}" |
|
|
|
num="0" |
|
|
|
while [[ $num -lt "${#nvmes[@]}" ]]; do |
|
|
|
@ -393,6 +395,7 @@ else |
|
|
|
done |
|
|
|
echo |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# M.2 card db files |
|
|
|
@ -608,7 +611,10 @@ else |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Check m2 volume support enabled |
|
|
|
# Enable m2 volume support |
|
|
|
if [[ $m2 != "no" ]]; then |
|
|
|
if [[ $m2exists == "yes" ]]; then |
|
|
|
# Check if m2 volume support is enabled |
|
|
|
smp=support_m2_pool |
|
|
|
setting="$(get_key_value $synoinfo ${smp})" |
|
|
|
enabled="" |
|
|
|
@ -633,6 +639,8 @@ if [[ $enabled == "yes" ]]; then |
|
|
|
echo -e "${Error}ERROR${Off} Failed to enable m2 volume support!" |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Edit synoinfo.conf to prevent drive db updates |
|
|
|
|