installer: tolerate missing tty in offline finalizer

This commit is contained in:
Ryan Hughes
2026-06-04 18:35:01 -04:00
parent e67128e4c9
commit 96a020f756
4 changed files with 54 additions and 13 deletions
+15 -10
View File
@@ -47,19 +47,24 @@ install)
# exists, with /mnt taking precedence (only present in the ISO context, and
# there it's the right one).
ARCHINSTALL_LOG="/var/log/archinstall/install.log"
if [[ -s /mnt/var/log/omarchy-install.log ]]; then
OMARCHY_LOG="/mnt/var/log/omarchy-install.log"
else
OMARCHY_LOG="/var/log/omarchy-install.log"
fi
LIVE_OMARCHY_LOG="/var/log/omarchy-install.log"
TARGET_OMARCHY_LOG="/mnt/var/log/omarchy-install.log"
cat "$SYSTEM_INFO" >"$TEMP_LOG"
[[ -s $ARCHINSTALL_LOG ]] && cat "$ARCHINSTALL_LOG" >>"$TEMP_LOG"
if [[ -s $OMARCHY_LOG ]]; then
printf '\n========================================\nOMARCHY INSTALL LOG (%s)\n========================================\n\n' "$OMARCHY_LOG" >>"$TEMP_LOG"
cat "$OMARCHY_LOG" >>"$TEMP_LOG"
else
echo "Warning: omarchy install log not found (looked at /mnt/var/log/ and /var/log/)" >&2
if [[ -s $LIVE_OMARCHY_LOG ]]; then
printf '\n========================================\nOMARCHY INSTALL LOG (%s)\n========================================\n\n' "$LIVE_OMARCHY_LOG" >>"$TEMP_LOG"
cat "$LIVE_OMARCHY_LOG" >>"$TEMP_LOG"
fi
if [[ -s $TARGET_OMARCHY_LOG ]] && ! cmp -s "$LIVE_OMARCHY_LOG" "$TARGET_OMARCHY_LOG" 2>/dev/null; then
printf '\n========================================\nTARGET OMARCHY INSTALL LOG (%s)\n========================================\n\n' "$TARGET_OMARCHY_LOG" >>"$TEMP_LOG"
cat "$TARGET_OMARCHY_LOG" >>"$TEMP_LOG"
fi
if [[ ! -s $LIVE_OMARCHY_LOG && ! -s $TARGET_OMARCHY_LOG ]]; then
echo "Warning: omarchy install log not found (looked at /var/log and /mnt/var/log)" >&2
fi
if [[ ! -s $TEMP_LOG ]]; then