fix: correct if/fi nesting in template selection blocks
This commit is contained in:
parent
1bb32bbc94
commit
a6134095d4
@ -4639,7 +4639,7 @@ create_lxc_container() {
|
|||||||
local selected_version
|
local selected_version
|
||||||
selected_version=$(prompt_select "Select ${PCT_OSTYPE} version:" 1 60 "${AVAILABLE_VERSIONS[@]}")
|
selected_version=$(prompt_select "Select ${PCT_OSTYPE} version:" 1 60 "${AVAILABLE_VERSIONS[@]}")
|
||||||
|
|
||||||
if [[ -n "$selected_version" ]]; then
|
# prompt_select always returns a value (uses default in unattended mode)
|
||||||
PCT_OSVERSION="$selected_version"
|
PCT_OSVERSION="$selected_version"
|
||||||
TEMPLATE_SEARCH="${PCT_OSTYPE}-${PCT_OSVERSION}"
|
TEMPLATE_SEARCH="${PCT_OSTYPE}-${PCT_OSVERSION}"
|
||||||
|
|
||||||
@ -4659,10 +4659,6 @@ create_lxc_container() {
|
|||||||
msg_error "No templates available for ${PCT_OSTYPE} ${PCT_OSVERSION}"
|
msg_error "No templates available for ${PCT_OSTYPE} ${PCT_OSVERSION}"
|
||||||
exit 225
|
exit 225
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
msg_custom "🚫" "${YW}" "Installation cancelled"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
msg_error "No ${PCT_OSTYPE} templates available at all"
|
msg_error "No ${PCT_OSTYPE} templates available at all"
|
||||||
exit 225
|
exit 225
|
||||||
@ -4698,7 +4694,7 @@ create_lxc_container() {
|
|||||||
local selected_version
|
local selected_version
|
||||||
selected_version=$(prompt_select "Select ${PCT_OSTYPE} version:" 1 60 "${AVAILABLE_VERSIONS[@]}")
|
selected_version=$(prompt_select "Select ${PCT_OSTYPE} version:" 1 60 "${AVAILABLE_VERSIONS[@]}")
|
||||||
|
|
||||||
if [[ -n "$selected_version" ]]; then
|
# prompt_select always returns a value (uses default in unattended mode)
|
||||||
export var_version="$selected_version"
|
export var_version="$selected_version"
|
||||||
export PCT_OSVERSION="$var_version"
|
export PCT_OSVERSION="$var_version"
|
||||||
msg_ok "Switched to ${PCT_OSTYPE} ${var_version}"
|
msg_ok "Switched to ${PCT_OSTYPE} ${var_version}"
|
||||||
@ -4744,7 +4740,6 @@ create_lxc_container() {
|
|||||||
msg_error "Template still not found after version change"
|
msg_error "Template still not found after version change"
|
||||||
exit 220
|
exit 220
|
||||||
}
|
}
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
msg_error "No ${PCT_OSTYPE} templates available"
|
msg_error "No ${PCT_OSTYPE} templates available"
|
||||||
exit 220
|
exit 220
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user