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.
This commit is contained in:
@@ -20,6 +20,26 @@ _OB_PID=$!
|
|||||||
# boucle (symptôme « fond bleu qui clignote/reboote »). On NE rend jamais la main
|
# 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.
|
# à startx : on reste sur Openbox pour lire les logs / rebooter proprement.
|
||||||
if command -v liveinst >/dev/null 2>&1; then
|
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_LOG=/tmp/fws-liveinst.log
|
||||||
liveinst >"$LIVEINST_LOG" 2>&1
|
liveinst >"$LIVEINST_LOG" 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
@@ -66,6 +86,9 @@ if command -v liveinst >/dev/null 2>&1; then
|
|||||||
echo
|
echo
|
||||||
echo "########## %post --nochroot (/tmp/fws-post-nochroot.log) ##########"
|
echo "########## %post --nochroot (/tmp/fws-post-nochroot.log) ##########"
|
||||||
cat /tmp/fws-post-nochroot.log 2>/dev/null || echo "(absent)"
|
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 \
|
for f in /tmp/anaconda.log /tmp/syslog /tmp/program.log \
|
||||||
/tmp/storage.log /tmp/dbus.log /tmp/packaging.log /tmp/X.log; do
|
/tmp/storage.log /tmp/dbus.log /tmp/packaging.log /tmp/X.log; do
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user