Browse Source

Update syno_hdd_db.sh

pull/15/head
007revad 3 years ago
committed by GitHub
parent
commit
84fc310592
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      syno_hdd_db.sh

8
syno_hdd_db.sh

@ -74,7 +74,7 @@ while getopts "sfn" option; do
case ${option,,,} in case ${option,,,} in
s) s)
showedits=yes showedits=yes
echo showedits # debug #echo showedits # debug
;; ;;
n) n)
nodbupdate=yes # For future use nodbupdate=yes # For future use
@ -168,7 +168,7 @@ for d in `cat /proc/partitions | awk '{print $4}'`; do
case "$d" in case "$d" in
hd*|sd*) hd*|sd*)
if [[ $d =~ [hs]d[a-z]{1,2}$ ]]; then if [[ $d =~ [hs]d[a-z]{1,2}$ ]]; then
echo -e "\n$d" # debug #echo -e "\n$d" # debug
getModel "/dev/$d" getModel "/dev/$d"
getFwVersion "/dev/$d" getFwVersion "/dev/$d"
if [[ $hdmodel ]] && [[ $fwrev ]]; then if [[ $hdmodel ]] && [[ $fwrev ]]; then
@ -178,7 +178,7 @@ for d in `cat /proc/partitions | awk '{print $4}'`; do
;; ;;
sas*|sata*) sas*|sata*)
if [[ $d =~ (sas|sata)[0-9][0-9]?[0-9]?$ ]]; then if [[ $d =~ (sas|sata)[0-9][0-9]?[0-9]?$ ]]; then
echo -e "\n$d" # debug #echo -e "\n$d" # debug
getModel "/dev/$d" getModel "/dev/$d"
getFwVersion "/dev/$d" getFwVersion "/dev/$d"
if [[ $hdmodel ]] && [[ $fwrev ]]; then if [[ $hdmodel ]] && [[ $fwrev ]]; then
@ -188,7 +188,7 @@ for d in `cat /proc/partitions | awk '{print $4}'`; do
;; ;;
nvme*) nvme*)
if [[ $d =~ nvme[0-9][0-9]?n[0-9][0-9]?$ ]]; then if [[ $d =~ nvme[0-9][0-9]?n[0-9][0-9]?$ ]]; then
echo -e "\n$d" # debug #echo -e "\n$d" # debug
n=n$(printf "$d" | cut -d "n" -f 2) n=n$(printf "$d" | cut -d "n" -f 2)
getNVMeModel "/sys/class/nvme/$n" getNVMeModel "/sys/class/nvme/$n"
getNVMeFwVersion "/sys/class/nvme/$n" getNVMeFwVersion "/sys/class/nvme/$n"

Loading…
Cancel
Save