From 5425d6aa9c931530d19dd24eb2536b4d1d5e637f Mon Sep 17 00:00:00 2001 From: Dave Russell <39733752+007revad@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:35:54 +1100 Subject: [PATCH] Update hdd_db_test.sh --- hdd_db_test.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/hdd_db_test.sh b/hdd_db_test.sh index b9bfea4..b66b1c8 100644 --- a/hdd_db_test.sh +++ b/hdd_db_test.sh @@ -1050,13 +1050,16 @@ check_modeldtb(){ [[ $modelname == "RS1221+" ]]; then echo "" >&2 -# if [[ -f ./dtb/${modelname}_model.dtb ]]; then -# # Edited device tree blob exists in dtb folder with script -# blob="./dtb/${modelname}_model.dtb" -# elif [[ -f ./${modelname}_model.dtb ]]; then -# # Edited device tree blob exists with script -# blob="./${modelname}_model.dtb" -# else + if [[ -f ./dtb/${modelname}_model.dtb ]]; then + # Edited device tree blob exists in dtb folder with script + blob="./dtb/${modelname}_model.dtb" + elif [[ -f ./${modelname}_model.dtb ]]; then + + echo -e "\nEdited device tree blob exists with script\n" # debug #################################################### + + # Edited device tree blob exists with script + blob="./${modelname}_model.dtb" + else # Download edited device tree blob model.dtb from github if cd /var/services/tmp; then echo -e "Downloading ${modelname}_model.dtb" >&2 @@ -1075,7 +1078,7 @@ check_modeldtb(){ else echo -e "${Error}ERROR${Off} Failed to download ${modelname}_model.dtb!" >&2 fi -# fi + fi if [[ -f $blob ]]; then # Backup model.dtb if ! backupdb "/etc.defaults/model.dtb"; then