fix(Installer-MultiDesktop): Fix the Multi Desktop Env you can now choose and use a desktop environnement
This commit is contained in:
@@ -4,8 +4,6 @@ update_db: true
|
||||
update_system: false
|
||||
|
||||
operations:
|
||||
- install:
|
||||
- packagechooser_desktop
|
||||
- remove:
|
||||
- calamares
|
||||
- kpmcore
|
||||
|
||||
@@ -1,21 +1,30 @@
|
||||
---
|
||||
# Exécuté HORS chroot (live system) pour accéder à l'ISO montée.
|
||||
# But : restaurer le kernel, détecter le bureau installé, lancer son init.
|
||||
# dontChroot: true = exécuté dans le live system.
|
||||
# ${ROOT} → substitué par Calamares (GlobalStorage "rootMountPoint").
|
||||
# $(cat ...) → substitution bash pure, Calamares ne la touche PAS.
|
||||
|
||||
dontChroot: true
|
||||
timeout: 7200
|
||||
|
||||
script:
|
||||
# Copie le kernel depuis l'ISO vers /boot du système cible
|
||||
- 'cp "$(find /run/archiso/bootmnt -name vmlinuz-linux 2>/dev/null | head -1)" "${ROOT}/boot/vmlinuz-linux"'
|
||||
|
||||
# Détecte le bureau installé en vérifiant les binaires présents dans la cible.
|
||||
# (packagechooser a déjà installé les paquets via le module packages)
|
||||
# Xfce est toujours présent (squashfs) donc on le garde en fallback.
|
||||
- 'if [ -f "${ROOT}/usr/bin/plasmashell" ]; then DESKTOP=kde; elif [ -f "${ROOT}/usr/bin/gnome-shell" ]; then DESKTOP=gnome; elif [ -f "${ROOT}/usr/bin/hyprland" ]; then DESKTOP=hyprland; else DESKTOP=xfce; fi'
|
||||
# DNS : copie le vrai fichier resolv.conf (résout le symlink cassé dans le chroot)
|
||||
- 'cp --remove-destination "$(readlink -f /etc/resolv.conf)" "${ROOT}/etc/resolv.conf"'
|
||||
|
||||
# Lance le script d'initialisation du bureau choisi
|
||||
- 'if [ ! -f "${ROOT}/usr/local/bin/fws-desktop-init-${DESKTOP}" ]; then echo "Script introuvable pour le bureau: ${DESKTOP}" >&2; exit 1; fi'
|
||||
- 'chroot "${ROOT}" /bin/bash "/usr/local/bin/fws-desktop-init-${DESKTOP}"'
|
||||
# Bypass temporaire du keyring pacman (vide dans le chroot fraîchement installé)
|
||||
# Empêche "error: keyring is not writable" lors du pacman -Sy dans le chroot.
|
||||
- 'sed -i "s/^SigLevel[[:space:]]*=.*/SigLevel = Never/" "${ROOT}/etc/pacman.conf" || true'
|
||||
|
||||
# Lance le script d'init du bureau choisi
|
||||
- 'chroot "${ROOT}" /bin/bash "/usr/local/bin/fws-desktop-init-$(cat /run/fws-desktop 2>/dev/null || echo xfce)"'
|
||||
|
||||
# Restaure SigLevel correct pour l'utilisateur final
|
||||
- 'sed -i "s/^SigLevel[[:space:]]*=.*/SigLevel = Required DatabaseOptional/" "${ROOT}/etc/pacman.conf" || true'
|
||||
|
||||
# Copie le keyring du live system → le système installé aura un keyring fonctionnel
|
||||
- 'mkdir -p "${ROOT}/etc/pacman.d/gnupg" && chmod 700 "${ROOT}/etc/pacman.d/gnupg" && cp -a /etc/pacman.d/gnupg/. "${ROOT}/etc/pacman.d/gnupg/"'
|
||||
|
||||
# Supprime le drop-in archiso (surcharge HOOKS inexistants post-install)
|
||||
- 'rm -f "${ROOT}/etc/mkinitcpio.conf.d/archiso.conf"'
|
||||
|
||||
@@ -27,6 +27,7 @@ sequence:
|
||||
- hwclock
|
||||
- networkcfg
|
||||
- packages
|
||||
- fws-desktop-choice
|
||||
- shellprocess
|
||||
- initcpiocfg
|
||||
- initcpio
|
||||
|
||||
Reference in New Issue
Block a user