diff --git a/liveuser/.local/bin/key-sign.sh b/liveuser/.local/bin/key-sign.sh index 3c414c1b..86d10aea 100755 --- a/liveuser/.local/bin/key-sign.sh +++ b/liveuser/.local/bin/key-sign.sh @@ -15,6 +15,9 @@ have_internet="$?" cd "/root" +rm /var/lib/pacman/sync/* +rm -rf /etc/pacman.d/gnupg/* + mkdir -p /root/.gnupg 2>/dev/null chmod 700 /root/.gnupg @@ -51,10 +54,13 @@ pacman-key --lsign-key endeavouros pacman-key --populate +echo " +keyserver hkp://keyserver.ubuntu.com:80" | sudo tee --append /etc/pacman.d/gnupg/gpg.conf + pacman-key --updatedb if [ "$have_internet" -eq 0 ]; then - pacman -Syy + pacman -Sy fi title="Successed!" @@ -79,8 +85,8 @@ do /usr/bin/su "$user" -c "${cmd[*]}" - if [ "$user" != "liveuser" ]; then - rm /home/"$user"/.config/autostart/key-sign.sh.desktop - rm /home/"$user"/.local/bin/key-sign.sh - fi + if [ "$user" != "liveuser" ]; then + rm /home/"$user"/.config/autostart/key-sign.sh.desktop + rm /home/"$user"/.local/bin/key-sign.sh + fi done