Files
fluffy-pancake/iso/enable_anaconda.sh
T
2026-03-09 19:56:42 +01:00

60 lines
1.8 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euxo pipefail
# --------------------------------------------------------------------
# Phase 1: Rootfs vorbereiten Anaconda erwartet KEIN /home
# --------------------------------------------------------------------
rm -rf /home
# --------------------------------------------------------------------
# Phase 2: Installer + Branding installieren
# --------------------------------------------------------------------
dnf install -y \
anaconda \
anaconda-live \
anaconda-webui \
anaconda-webui-branding-fedora \
polkit \
firefox
# --------------------------------------------------------------------
# Phase 3: WebUI systemd-Servicefile anlegen
# --------------------------------------------------------------------
cat > /usr/lib/systemd/system/anaconda-webui.service <<'EOF'
[Unit]
Description=Anaconda Web UI
After=network.target graphical.target
[Service]
Type=simple
ExecStart=/usr/bin/anaconda-webui
Restart=on-failure
[Install]
WantedBy=graphical.target
EOF
# --------------------------------------------------------------------
# Phase 4: Service aktivieren
# --------------------------------------------------------------------
systemctl enable anaconda-webui.service
# --------------------------------------------------------------------
# Phase 5: Desktop-Launcher für den Installer
# --------------------------------------------------------------------
cat > /usr/share/applications/install-to-disk.desktop <<'EOF'
[Desktop Entry]
Name=Jetzt installieren
Comment=Installiere das System auf die Festplatte
Exec=xdg-open http://localhost:8080
Icon=system-installer
Terminal=false
Type=Application
Categories=System;
EOF
# --------------------------------------------------------------------
# Phase 6: Finalen Zielzustand herstellen
# --------------------------------------------------------------------
mkdir -p /home