fix(Installer ─ Multi-Desktop): Fix Multi Desktop
This commit is contained in:
@@ -1,33 +1,21 @@
|
||||
---
|
||||
# dontChroot: true = exécuté dans le live system.
|
||||
# ${ROOT} → substitué par Calamares (GlobalStorage "rootMountPoint").
|
||||
# $(cat ...) → substitution bash pure, Calamares ne la touche PAS.
|
||||
# Exécuté HORS chroot (live system) pour accéder à l'ISO montée.
|
||||
# But : restaurer le kernel (retiré du squashfs par mkarchiso) et
|
||||
# corriger les fichiers mkinitcpio archiso-spécifiques.
|
||||
|
||||
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"'
|
||||
- 'DESKTOP="$(cat /run/fws-desktop 2>/dev/null || printf xfce)"'
|
||||
- 'if [ -z "$DESKTOP" ]; then DESKTOP="xfce"; fi'
|
||||
- 'if [ ! -f "${ROOT}/usr/local/bin/fws-desktop-init-$DESKTOP" ]; then echo "Script bureau introuvable: $DESKTOP" >&2; exit 1; fi'
|
||||
- 'chroot "${ROOT}" /bin/bash "/usr/local/bin/fws-desktop-init-$DESKTOP"'
|
||||
|
||||
# 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"'
|
||||
|
||||
# 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)
|
||||
# Supprime le drop-in archiso (surcharge HOOKS avec des hooks inexistants post-install)
|
||||
- 'rm -f "${ROOT}/etc/mkinitcpio.conf.d/archiso.conf"'
|
||||
|
||||
# Remplace le linux.preset archiso par le preset standard (default + fallback)
|
||||
# \x27 = ' et \x22 = " pour éviter les conflits de quotes dans YAML/bash
|
||||
- 'printf "PRESETS=(\x27default\x27 \x27fallback\x27)\nALL_kver=\x22/boot/vmlinuz-linux\x22\nALL_config=\x22/etc/mkinitcpio.conf\x22\nALL_microcode=(/boot/*-ucode.img)\ndefault_image=\x22/boot/initramfs-linux.img\x22\nfallback_image=\x22/boot/initramfs-linux-fallback.img\x22\nfallback_options=\x22-S autodetect\x22\n" > "${ROOT}/etc/mkinitcpio.d/linux.preset"'
|
||||
|
||||
Reference in New Issue
Block a user