Update build.func
This commit is contained in:
parent
b529d45db0
commit
4613021586
@ -2830,30 +2830,34 @@ EOF'
|
|||||||
# fi
|
# fi
|
||||||
#
|
#
|
||||||
# # Show available logs
|
# # Show available logs
|
||||||
echo ""
|
# echo ""
|
||||||
[[ "$build_log_copied" == true ]] && echo -e "${GN}✔${CL} Container creation log: ${BL}/tmp/create-lxc-${CTID}-${SESSION_ID}.log${CL}"
|
# [[ "$build_log_copied" == true ]] && echo -e "${GN}✔${CL} Container creation log: ${BL}/tmp/create-lxc-${CTID}-${SESSION_ID}.log${CL}"
|
||||||
[[ "$install_log_copied" == true ]] && echo -e "${GN}✔${CL} Installation log: ${BL}/tmp/install-lxc-${CTID}-${SESSION_ID}.log${CL}"
|
# [[ "$install_log_copied" == true ]] && echo -e "${GN}✔${CL} Installation log: ${BL}/tmp/install-lxc-${CTID}-${SESSION_ID}.log${CL}"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# Dev mode: Keep container or open breakpoint shell
|
# PROBLEMATIC: DEV_MODE keep/breakpoint logic
|
||||||
if [[ "${DEV_MODE_KEEP:-false}" == "true" ]]; then
|
# TODO: Working version doesn't have DEV_MODE
|
||||||
msg_dev "Keep mode active - container ${CTID} preserved"
|
# # Dev mode: Keep container or open breakpoint shell
|
||||||
return 0
|
# if [[ "${DEV_MODE_KEEP:-false}" == "true" ]]; then
|
||||||
elif [[ "${DEV_MODE_BREAKPOINT:-false}" == "true" ]]; then
|
# msg_dev "Keep mode active - container ${CTID} preserved"
|
||||||
msg_dev "Breakpoint mode - opening shell in container ${CTID}"
|
# return 0
|
||||||
echo -e "${YW}Type 'exit' to return to host${CL}"
|
# elif [[ "${DEV_MODE_BREAKPOINT:-false}" == "true" ]]; then
|
||||||
pct enter "$CTID"
|
# msg_dev "Breakpoint mode - opening shell in container ${CTID}"
|
||||||
echo ""
|
# echo -e "${YW}Type 'exit' to return to host${CL}"
|
||||||
echo -en "${YW}Container ${CTID} still running. Remove now? (y/N): ${CL}"
|
# pct enter "$CTID"
|
||||||
if read -r response && [[ "$response" =~ ^[Yy]$ ]]; then
|
# echo ""
|
||||||
pct stop "$CTID" &>/dev/null || true
|
# echo -en "${YW}Container ${CTID} still running. Remove now? (y/N): ${CL}"
|
||||||
pct destroy "$CTID" &>/dev/null || true
|
# if read -r response && [[ "$response" =~ ^[Yy]$ ]]; then
|
||||||
msg_ok "Container ${CTID} removed"
|
# pct stop "$CTID" &>/dev/null || true
|
||||||
else
|
# pct destroy "$CTID" &>/dev/null || true
|
||||||
msg_dev "Container ${CTID} kept for debugging"
|
# msg_ok "Container ${CTID} removed"
|
||||||
fi
|
# else
|
||||||
exit $install_exit_code
|
# msg_dev "Container ${CTID} kept for debugging"
|
||||||
fi
|
# fi
|
||||||
|
# exit $install_exit_code
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# Working version: Simple cleanup on failure
|
||||||
|
|
||||||
# Prompt user for cleanup with 60s timeout (plain echo - no msg_info to avoid spinner)
|
# Prompt user for cleanup with 60s timeout (plain echo - no msg_info to avoid spinner)
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user