Browse Source

Update syno_hdd_db.sh

Bug fix for detecting if script is installed on NVMe drive.
pull/187/head
Dave Russell 2 years ago
committed by GitHub
parent
commit
542d66f1b1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      syno_hdd_db.sh

2
syno_hdd_db.sh

@ -295,7 +295,7 @@ echo "Running from: ${scriptpath}/$scriptfile"
# Warn if script located on M.2 drive # Warn if script located on M.2 drive
scriptvol=$(echo "$scriptpath" | cut -d"/" -f2) scriptvol=$(echo "$scriptpath" | cut -d"/" -f2)
vg=$(lvdisplay | grep /volume_"${volume#volume}" | cut -d"/" -f3) vg=$(lvdisplay | grep /volume_"${scriptvol#volume}" | cut -d"/" -f3)
md=$(pvdisplay | grep -B 1 "$vg" | grep /dev/ | cut -d"/" -f3) md=$(pvdisplay | grep -B 1 "$vg" | grep /dev/ | cut -d"/" -f3)
if cat /proc/mdstat | grep "$md" | grep nvme >/dev/null; then if cat /proc/mdstat | grep "$md" | grep nvme >/dev/null; then
echo "${Yellow}WARNING${Off} Don't store this script on an NVMe volume!" echo "${Yellow}WARNING${Off} Don't store this script on an NVMe volume!"

Loading…
Cancel
Save