Fix: Passt Konfigurationsdatei suchen an.

This commit is contained in:
DragonSlayer_14 2025-03-26 16:28:40 +01:00
parent 1bed0aea74
commit d50a2ae636

View File

@ -37,22 +37,29 @@ mkinitcpio -P
echo "🎨 Setze Plymouth-Theme auf 'arch'..." echo "🎨 Setze Plymouth-Theme auf 'arch'..."
plymouth-set-default-theme -R archlinux plymouth-set-default-theme -R archlinux
# Kernel-Boot-Parameter in systemd-boot anpassen # Korrekte Konfigurationsdatei suchen
BOOT_LOADER_CONF="/boot/loader/entries/arch.conf" BOOT_ENTRY_DIR="/boot/loader/entries"
BOOT_ENTRY_FILE=$(find "$BOOT_ENTRY_DIR" -name "*.conf" | head -n 1)
if [[ -f "$BOOT_LOADER_CONF" ]]; then if [[ -z "$BOOT_ENTRY_FILE" ]]; then
echo "🔍 Überprüfe systemd-boot-Konfiguration..." echo "❌ Keine systemd-boot Eintragsdatei gefunden!"
NEW_CMDLINE="quiet splash vt.global_cursor_default=0 loglevel=3 rd.luks.options=discard plymouth.ignore-serial-consoles"
# Kernel-Parameter anpassen
if grep -q "options=" "$BOOT_LOADER_CONF"; then
sed -i "s|^options=.*|options=\"$NEW_CMDLINE\"|" "$BOOT_LOADER_CONF"
else
echo "options=\"$NEW_CMDLINE\"" >>"$BOOT_LOADER_CONF"
fi
else
echo "❌ systemd-boot Konfigurationsdatei nicht gefunden!"
exit 1 exit 1
fi fi
echo "🔍 Gefundene Konfigurationsdatei: $BOOT_ENTRY_FILE"
# Backup erstellen
BACKUP_FILE="${BOOT_ENTRY_FILE}.backup_$(date +%Y%m%d%H%M%S)"
cp "$BOOT_ENTRY_FILE" "$BACKUP_FILE"
echo "🛑 Backup gespeichert unter: $BACKUP_FILE"
NEW_CMDLINE="quiet splash vt.global_cursor_default=0 loglevel=3 rd.luks.options=discard plymouth.ignore-serial-consoles"
# Kernel-Parameter anpassen
if grep -q "^options=" "$BOOT_ENTRY_FILE"; then
sed -i "s|^options=.*|options=$NEW_CMDLINE|" "$BOOT_ENTRY_FILE"
else
echo "options=$NEW_CMDLINE" >> "$BOOT_ENTRY_FILE"
fi
echo "✅ Einrichtung abgeschlossen. Bitte starte das System neu, um die Änderungen zu übernehmen." echo "✅ Einrichtung abgeschlossen. Bitte starte das System neu, um die Änderungen zu übernehmen."