feat(installer): translate the progress steps of the kickstart scripts
locale-gen now always runs: the live ships every UTF-8 locale, and only locale-gen rebuilds the installed system's archive from its own /etc/locale.gen instead of keeping about 190 MiB of locales.
This commit is contained in:
1 file changed
+19
-16
@@ -137,7 +137,7 @@ bootloader --disabled
|
|||||||
# pacman, choix de bureau écrit par l'addon de sélection).
|
# pacman, choix de bureau écrit par l'addon de sélection).
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
%post --nochroot --log=/tmp/fws-post-nochroot.log
|
%post --nochroot --log=/tmp/fws-post-nochroot.log
|
||||||
# FWS-TITLE: Préparation de l'installation (live)
|
# FWS-TITLE: fws:progress.title_prepare
|
||||||
# Écran de progression : chaque phase publie son avancement (fws-install-step),
|
# Écran de progression : chaque phase publie son avancement (fws-install-step),
|
||||||
# l'installeur affiche le script en cours, ce qu'il fait et un pourcentage.
|
# l'installeur affiche le script en cours, ce qu'il fait et un pourcentage.
|
||||||
set -x
|
set -x
|
||||||
@@ -247,7 +247,7 @@ if [ -f /tmp/fws-keep-wifi ]; then
|
|||||||
"$SYSROOT/etc/NetworkManager/system-connections/" 2>/dev/null || true
|
"$SYSROOT/etc/NetworkManager/system-connections/" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fws-install-step 6 "Système de base préparé — configuration"
|
fws-install-step 6 fws:progress.base_ready
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|
||||||
@@ -257,9 +257,9 @@ fws-install-step 6 "Système de base préparé — configuration"
|
|||||||
# Log persistant : /var/log/fws-post.log sur le système installé.
|
# Log persistant : /var/log/fws-post.log sur le système installé.
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
%post --log=/var/log/fws-post.log
|
%post --log=/var/log/fws-post.log
|
||||||
# FWS-TITLE: Configuration du système installé
|
# FWS-TITLE: fws:progress.title_configure
|
||||||
set -x
|
set -x
|
||||||
fws-install-step 8 "Nettoyage des résidus du live"
|
fws-install-step 8 fws:progress.live_cleanup
|
||||||
|
|
||||||
# --- 0) initramfs PROPRE, AVANT TOUT pacman — L'ORDRE COMPTE (vu en réel) ----
|
# --- 0) initramfs PROPRE, AVANT TOUT pacman — L'ORDRE COMPTE (vu en réel) ----
|
||||||
# Le live fournit /etc/mkinitcpio.d/linux.preset = preset « archiso » (pointe
|
# Le live fournit /etc/mkinitcpio.d/linux.preset = preset « archiso » (pointe
|
||||||
@@ -346,7 +346,7 @@ rm -f /etc/systemd/system/dbus-org.freedesktop.network1.service \
|
|||||||
/etc/systemd/system/sockets.target.wants/pcscd.socket \
|
/etc/systemd/system/sockets.target.wants/pcscd.socket \
|
||||||
/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service 2>/dev/null || true
|
/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service 2>/dev/null || true
|
||||||
|
|
||||||
fws-install-step 14 "Construction de l'initramfs"
|
fws-install-step 14 fws:progress.initramfs
|
||||||
|
|
||||||
# --- 2) mkinitcpio : noyau (rattrapage) + génération finale -----------------
|
# --- 2) mkinitcpio : noyau (rattrapage) + génération finale -----------------
|
||||||
# mkinitcpio exige un noyau lisible : s'il manque (rattrapage de copie raté
|
# mkinitcpio exige un noyau lisible : s'il manque (rattrapage de copie raté
|
||||||
@@ -372,7 +372,7 @@ else
|
|||||||
echo "[FWS] CRITIQUE : toujours aucun noyau — initramfs NON généré, le disque NE BOOTERA PAS."
|
echo "[FWS] CRITIQUE : toujours aucun noyau — initramfs NON généré, le disque NE BOOTERA PAS."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fws-install-step 22 "Installation de GRUB"
|
fws-install-step 22 fws:progress.grub
|
||||||
|
|
||||||
# --- 3) GRUB installé à la main (cf. bootloader --disabled) ------------------
|
# --- 3) GRUB installé à la main (cf. bootloader --disabled) ------------------
|
||||||
install_grub() {
|
install_grub() {
|
||||||
@@ -502,7 +502,7 @@ fi
|
|||||||
# d'activation n'est créé qu'ici, dans le système installé).
|
# d'activation n'est créé qu'ici, dans le système installé).
|
||||||
systemctl enable fws-grub-finalize.service || true
|
systemctl enable fws-grub-finalize.service || true
|
||||||
|
|
||||||
fws-install-step 28 "Clavier et langue du système"
|
fws-install-step 28 fws:progress.keyboard_language
|
||||||
|
|
||||||
# --- 3bis) Clavier (X11) + LOCALE --------------------------------------------
|
# --- 3bis) Clavier (X11) + LOCALE --------------------------------------------
|
||||||
# CLAVIER : Anaconda passe par localed et n'écrit pas fiablement la disposition X
|
# CLAVIER : Anaconda passe par localed et n'écrit pas fiablement la disposition X
|
||||||
@@ -539,10 +539,13 @@ if [ -n "$FWSLANG" ]; then
|
|||||||
_cs="${FWSLANG##*.}"; [ "$_cs" = "$FWSLANG" ] && _cs="UTF-8"
|
_cs="${FWSLANG##*.}"; [ "$_cs" = "$FWSLANG" ] && _cs="UTF-8"
|
||||||
grep -qE "^[[:space:]]*${FWSLANG}[[:space:]]+${_cs}\b" /etc/locale.gen 2>/dev/null \
|
grep -qE "^[[:space:]]*${FWSLANG}[[:space:]]+${_cs}\b" /etc/locale.gen 2>/dev/null \
|
||||||
|| printf '%s %s\n' "$FWSLANG" "$_cs" >> /etc/locale.gen
|
|| printf '%s %s\n' "$FWSLANG" "$_cs" >> /etc/locale.gen
|
||||||
locale-gen || echo "[FWS] locale-gen a échoué pour $FWSLANG"
|
|
||||||
fi
|
fi
|
||||||
|
# Always, even without a language: the live ships every UTF-8 locale (so the
|
||||||
|
# installer speaks all of Anaconda's languages) and locale-gen rebuilds the
|
||||||
|
# archive from /etc/locale.gen only, instead of keeping ~190 MiB of locales.
|
||||||
|
locale-gen || echo "[FWS] locale-gen a échoué pour ${FWSLANG:-?}"
|
||||||
|
|
||||||
fws-install-step 32 "Installation du bureau (pacman)"
|
fws-install-step 32 fws:progress.desktop_install
|
||||||
|
|
||||||
# --- 4) Bureau choisi : pacman -S du DE (non bloquant si pas de réseau) -------
|
# --- 4) Bureau choisi : pacman -S du DE (non bloquant si pas de réseau) -------
|
||||||
DESK="cli"
|
DESK="cli"
|
||||||
@@ -808,7 +811,7 @@ MOTD
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fws-install-step 62 "Bureau installé — pilotes et pile matérielle"
|
fws-install-step 62 fws:progress.desktop_installed
|
||||||
|
|
||||||
# --- 4quater) ADN FWS : détection matériel + drivers + stack « Windows » ------
|
# --- 4quater) ADN FWS : détection matériel + drivers + stack « Windows » ------
|
||||||
# Script dédié (NON bloquant ; réseau requis) : drivers GPU détectés via lspci
|
# Script dédié (NON bloquant ; réseau requis) : drivers GPU détectés via lspci
|
||||||
@@ -824,7 +827,7 @@ if [ -x /usr/local/bin/fws-setup-hardware ]; then
|
|||||||
/usr/local/bin/fws-setup-hardware --unattended "$DESK" || true
|
/usr/local/bin/fws-setup-hardware --unattended "$DESK" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fws-install-step 76 "Configuration du bureau (raccourcis, barres, thème)"
|
fws-install-step 76 fws:progress.desktop_config
|
||||||
|
|
||||||
# --- Config Hyprland (si choisi) : clavier + apps + waybar -------------------
|
# --- Config Hyprland (si choisi) : clavier + apps + waybar -------------------
|
||||||
# Hyprland (Wayland) NE lit PAS /etc/X11/xorg.conf.d/00-keyboard.conf : sa
|
# Hyprland (Wayland) NE lit PAS /etc/X11/xorg.conf.d/00-keyboard.conf : sa
|
||||||
@@ -882,7 +885,7 @@ if [ "$DESK" = "i3" ] && [ -f /usr/local/share/fws/i3-config ]; then
|
|||||||
done < /etc/passwd
|
done < /etc/passwd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fws-install-step 84 "Droits administrateur et identité FWS"
|
fws-install-step 84 fws:progress.admin_identity
|
||||||
|
|
||||||
# --- 4bis) Sudo : l'utilisateur créé doit pouvoir administrer -----------------
|
# --- 4bis) Sudo : l'utilisateur créé doit pouvoir administrer -----------------
|
||||||
# Arch laisse « %wheel » COMMENTÉ dans sudoers → même un membre de wheel ne peut
|
# Arch laisse « %wheel » COMMENTÉ dans sudoers → même un membre de wheel ne peut
|
||||||
@@ -956,7 +959,7 @@ systemctl enable systemd-timesyncd.service 2>/dev/null || true
|
|||||||
# normal), la target le tire par Requires. Dans le bureau, le lanceur
|
# normal), la target le tire par Requires. Dans le bureau, le lanceur
|
||||||
# « Récupération FWS » (fws-recovery.desktop, polkit) fait le même travail.
|
# « Récupération FWS » (fws-recovery.desktop, polkit) fait le même travail.
|
||||||
|
|
||||||
fws-install-step 92 "Sécurité et réseau du système installé"
|
fws-install-step 92 fws:progress.security_network
|
||||||
|
|
||||||
# --- 5) Sécurité : verrouiller root s'il est resté SANS mot de passe ----------
|
# --- 5) Sécurité : verrouiller root s'il est resté SANS mot de passe ----------
|
||||||
# L'airootfs live a souvent un root sans mot de passe ; si l'utilisateur n'en a
|
# L'airootfs live a souvent un root sans mot de passe ; si l'utilisateur n'en a
|
||||||
@@ -981,7 +984,7 @@ systemctl enable systemd-resolved.service 2>/dev/null || true
|
|||||||
install -d /etc/NetworkManager/conf.d
|
install -d /etc/NetworkManager/conf.d
|
||||||
printf '[main]\ndns=systemd-resolved\n' > /etc/NetworkManager/conf.d/dns.conf
|
printf '[main]\ndns=systemd-resolved\n' > /etc/NetworkManager/conf.d/dns.conf
|
||||||
|
|
||||||
fws-install-step 99 "Finalisation"
|
fws-install-step 99 fws:progress.finalizing
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|
||||||
@@ -994,9 +997,9 @@ fws-install-step 99 "Finalisation"
|
|||||||
# le disque va booter.
|
# le disque va booter.
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
%post --nochroot
|
%post --nochroot
|
||||||
# FWS-TITLE: Finalisation et copie des journaux
|
# FWS-TITLE: fws:progress.title_finish
|
||||||
SYSROOT=/mnt/sysroot
|
SYSROOT=/mnt/sysroot
|
||||||
[ -d "$SYSROOT" ] || SYSROOT=/mnt/sysimage
|
[ -d "$SYSROOT" ] || SYSROOT=/mnt/sysimage
|
||||||
cp -f "$SYSROOT/var/log/fws-post.log" /tmp/fws-post-chroot.log 2>/dev/null || true
|
cp -f "$SYSROOT/var/log/fws-post.log" /tmp/fws-post-chroot.log 2>/dev/null || true
|
||||||
fws-install-step 100 "Installation terminée"
|
fws-install-step 100 fws:progress.done
|
||||||
%end
|
%end
|
||||||
Reference in new issue
Block a user