diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 76bca9b..bea4028 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -1114,9 +1114,6 @@ editdb7(){ #exit 6 fi fi - - # Edit existing drives in db with compatibility:unverified # Issue #224 - sed -i 's/unverified/support/g' "$2" } @@ -1163,6 +1160,14 @@ updatedb(){ editdb7 "append" "$2" fi fi + + # Edit existing drives in db with compatibility:unverified # Issue #224 + if grep 'unverified' "$2" >/dev/null; then + sed -i 's/unverified/support/g' "$2" + if ! grep 'unverified' "$2" >/dev/null; then + echo -e "Edited unverified drives in ${Cyan}$(basename -- "$2")${Off}" >&2 + fi + fi elif [[ $dbtype -eq "6" ]]; then if grep "$hdmodel" "$2" >/dev/null; then echo -e "${Yellow}$hdmodel${Off} already exists in ${Cyan}$(basename -- "$2")${Off}" >&2