From 1bed0aea74443acd17d0c6e851930b99d5e33971 Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Wed, 26 Mar 2025 16:21:46 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20F=C3=9Chrt=20yay=20als=20Nutzer=20aus.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 6_Plymouth.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/6_Plymouth.sh b/6_Plymouth.sh index 561f7d2..067df09 100755 --- a/6_Plymouth.sh +++ b/6_Plymouth.sh @@ -8,9 +8,16 @@ if [[ $EUID -ne 0 ]]; then exit 1 fi +if [[ -z "$SUDO_USER" || "$SUDO_USER" == "root" ]]; then + echo "❌ Fehler: Das Skript muss mit 'sudo' von einem normalen Benutzer ausgeführt werden." + exit 1 +fi + +USER_NAME="$SUDO_USER" + echo "🔄 Plymouth und benötigte Pakete installieren..." pacman -Syu --noconfirm plymouth -yay -Syu plymouth-theme-archlinux --noconfirm +sudo -u $USER_NAME yay -Syu plymouth-theme-archlinux --noconfirm # Plymouth in initramfs aktivieren MKINIT_CONF="/etc/mkinitcpio.conf"