From 1917a3321b5548fdf2438034ad3e55b4c46c7173 Mon Sep 17 00:00:00 2001 From: nocode Date: Fri, 3 Jul 2026 03:24:14 +0200 Subject: [PATCH] feat(xinitrc): add hardware detection summary before installer launch Add fws-hw-detect integration to display hardware information in a dialog before launching the installer. This allows users to review detected hardware (GPU drivers, hypervisor guest tools, disk info) before proceeding. The summary is shown via zenity if available, with options to launch the installer or power off. Also includes the hardware summary in the installation logs for debugging purposes. --- configs/baseline/airootfs/root/.xinitrc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configs/baseline/airootfs/root/.xinitrc b/configs/baseline/airootfs/root/.xinitrc index b7b050e..9e6c833 100644 --- a/configs/baseline/airootfs/root/.xinitrc +++ b/configs/baseline/airootfs/root/.xinitrc @@ -20,6 +20,26 @@ _OB_PID=$! # boucle (symptôme « fond bleu qui clignote/reboote »). On NE rend jamais la main # à startx : on reste sur Openbox pour lire les logs / rebooter proprement. if command -v liveinst >/dev/null 2>&1; then + # Chantier D : RÉCAPITULATIF matériel AVANT de lancer l'installateur. + # fws-hw-detect est la MÊME source de vérité que le %post du kickstart + # (mode --env) → ce que cet écran annonce = ce que l'install appliquera + # (drivers GPU, guest tools de l'hyperviseur, effacement des disques…). + # « Éteindre » est le seul moyen propre d'annuler : on ne rend jamais la + # main à startx (cf. plus bas), et liveinst n'a pas encore touché au disque. + # Tout est best-effort : sans script ou sans zenity, on installe comme avant. + if command -v fws-hw-detect >/dev/null 2>&1; then + fws-hw-detect --text >/tmp/fws-hw-summary.txt 2>/dev/null || true + if command -v zenity >/dev/null 2>&1 && [ -s /tmp/fws-hw-summary.txt ]; then + if ! zenity --text-info --title="FWS — Récapitulatif avant installation" \ + --filename=/tmp/fws-hw-summary.txt \ + --ok-label="Lancer l'installateur" --cancel-label="Éteindre" \ + --width=800 --height=700 2>/dev/null; then + systemctl poweroff + exit 0 + fi + fi + fi + LIVEINST_LOG=/tmp/fws-liveinst.log liveinst >"$LIVEINST_LOG" 2>&1 rc=$? @@ -66,6 +86,9 @@ if command -v liveinst >/dev/null 2>&1; then echo echo "########## %post --nochroot (/tmp/fws-post-nochroot.log) ##########" cat /tmp/fws-post-nochroot.log 2>/dev/null || echo "(absent)" + echo + echo "########## Récapitulatif matériel montré avant l'install ##########" + cat /tmp/fws-hw-summary.txt 2>/dev/null || echo "(absent)" for f in /tmp/anaconda.log /tmp/syslog /tmp/program.log \ /tmp/storage.log /tmp/dbus.log /tmp/packaging.log /tmp/X.log; do echo