From fed24086ea730dce58b90a8ab6084891af9ea359 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 24 Sep 2025 08:51:14 +0200 Subject: [PATCH] Update build.func --- misc/build.func | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/misc/build.func b/misc/build.func index c228ca92..6a674cf3 100644 --- a/misc/build.func +++ b/misc/build.func @@ -1688,10 +1688,18 @@ edit_default_storage() { local vf="/usr/local/community-scripts/default.vars" # make sure file exists - if [ ! -f "$vf" ]; then - msg_info "No default.vars found, creating $vf" - mkdir -p /usr/local/community-scripts + if [[ ! -f "$vf" ]]; then + # still create + mkdir -p "$(dirname "$vf")" touch "$vf" + + if select_storage template; then + echo "var_template_storage=$STORAGE_RESULT" >>"$vf" + fi + + if select_storage container; then + echo "var_container_storage=$STORAGE_RESULT" >>"$vf" + fi fi # reuse the same Whiptail selection we already have