Update create_lxc.sh

This commit is contained in:
CanbiZ 2025-07-04 14:49:36 +02:00
parent 4012dd3dcd
commit cb1df6ff67

View File

@ -211,26 +211,23 @@ if [[ -f "$DEFAULT_FILE" ]]; then
else
# TEMPLATE STORAGE SELECTION
# Template Storage
if ! TEMPLATE_STORAGE=$(select_storage template); then
[[ $? -eq 202 ]] && {
msg_error "Template Storage selection cancelled by user. Exiting."
kill -INT $$
}
msg_error "Unexpected error during template storage selection."
exit 1
fi
while true; do
TEMPLATE_STORAGE=$(select_storage template)
if [[ -n "$TEMPLATE_STORAGE" ]]; then
msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage."
# Container Storage
if ! CONTAINER_STORAGE=$(select_storage container); then
[[ $? -eq 202 ]] && {
msg_error "Container Storage selection cancelled by user. Exiting."
kill -INT $$
}
msg_error "Unexpected error during container storage selection."
exit 1
break
fi
msg_warn "No valid template storage selected. Please try again."
done
while true; do
CONTAINER_STORAGE=$(select_storage container)
if [[ -n "$CONTAINER_STORAGE" ]]; then
msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage."
break
fi
msg_warn "No valid container storage selected. Please try again."
done
fi