From 44d3a4865fc24a0065a1387896e17b2becd71f1c Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Wed, 22 May 2024 23:58:28 +0500 Subject: [PATCH] Update --- liveuser/.local/bin/key-sign.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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