Browse Source

Update syno_hdd_db.sh

- Added check that M.2 volume support is enabled.
pull/15/head v1.1.12
007revad 3 years ago
committed by GitHub
parent
commit
e7dc08442b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      syno_hdd_db.sh

22
syno_hdd_db.sh

@ -33,6 +33,8 @@
# It's also parsed and checked and probably in some cases it could be more critical to patch that one instead.
# DONE
# Added check that M.2 volume support is enabled.
#
# Added support for M.2 SATA drives.
#
# Can now skip processing M.2 drives by running script with the -m2 flag.
@ -61,7 +63,7 @@
# Optionally disable "support_disk_compatibility".
scriptver="1.1.11"
scriptver="1.1.12"
# Check latest release with GitHub API
get_latest_release() {
@ -74,7 +76,7 @@ tag=$(get_latest_release "007revad/Synology_HDD_db")
if ! printf "%s\n%s\n" "$tag" "$scriptver" |
sort --check --version-sort &> /dev/null ; then
echo "There is a newer version of this script available."
echo -e "\e[0;36mThere is a newer version of this script available.\e[0m"
echo -e "Current version: ${scriptver}\nLatest version: $tag"
echo "https://github.com/007revad/Synology_HDD_db/releases/latest"
echo ""
@ -131,12 +133,7 @@ fi
#------------------------------------------------------------------------------
# Get list of installed SATA, SAS and M.2 NVMe/SATA drives
#for d in $(ls /sys/block); do
for d in /sys/block/*; do
# if [ ! -e /dev/"$d" ]; then
# echo "Found /dev/$d" # debug
# continue;
# fi
#echo $d # debug
case "$(basename -- "${d}")" in
sd*|hd*)
@ -404,6 +401,17 @@ else
fi
# Check m2 volume support enabled
setting="$(get_key_value /etc.defaults/synoinfo.conf support_m2_pool)"
if [[ $setting == "no" ]]; then
sed -i "s/${sdc}=\"no\"/${sdc}=\"yes\"/" "/etc.defaults/synoinfo.conf"
setting="$(get_key_value /etc.defaults/synoinfo.conf support_m2_pool)"
if [[ $setting == "yes" ]]; then
echo -e "\nEnabled M.2 volume support."
fi
fi
# Edit synoinfo.conf to prevent DB updates
#if [[ $nodbupdate == "yes" ]]; then # For future use
file=/etc.defaults/synoinfo.conf

Loading…
Cancel
Save