installer: trace finalizer in debug builds
This commit is contained in:
+15
-1
@@ -5,12 +5,26 @@
|
||||
# target-side setup scripts. The ISO parent owns UI/error handling, while the
|
||||
# online path re-establishes its tty-backed traps below.
|
||||
|
||||
export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}"
|
||||
|
||||
if [[ ${OMARCHY_INSTALL_DEBUG:-} == "1" ]]; then
|
||||
if [[ -n ${OMARCHY_CHROOT_FINALIZER:-} || ${OMARCHY_INSTALL_MODE:-} == "offline" ]]; then
|
||||
if { mkdir -p "$(dirname "$OMARCHY_INSTALL_LOG_FILE")" && touch "$OMARCHY_INSTALL_LOG_FILE"; } 2>/dev/null; then
|
||||
exec >>"$OMARCHY_INSTALL_LOG_FILE" 2>&1
|
||||
else
|
||||
echo "[finalize-debug] WARNING: cannot write $OMARCHY_INSTALL_LOG_FILE; tracing to inherited stderr" >&2
|
||||
fi
|
||||
fi
|
||||
export PS4='+ ${BASH_SOURCE[0]##*/}:${LINENO}:${FUNCNAME[0]:-main}: '
|
||||
echo "[finalize-debug] tracing enabled for $$ at $(date -Is)"
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -eEo pipefail
|
||||
|
||||
_OMARCHY_INSTALLER_DIR=$(dirname "$(realpath "${BASH_SOURCE[0]}")")
|
||||
export OMARCHY_PATH="${OMARCHY_PATH:-$_OMARCHY_INSTALLER_DIR}"
|
||||
export OMARCHY_INSTALL="${OMARCHY_INSTALL:-$_OMARCHY_INSTALLER_DIR/install}"
|
||||
export OMARCHY_INSTALL_LOG_FILE="${OMARCHY_INSTALL_LOG_FILE:-/var/log/omarchy-install.log}"
|
||||
export PATH="$_OMARCHY_INSTALLER_DIR/bin:$OMARCHY_PATH/bin:$PATH"
|
||||
|
||||
# Do not source helpers/all.sh here. That bundle unconditionally pulls in
|
||||
|
||||
Reference in New Issue
Block a user