From e66e1dfd8307ae7a7f23245fa0d00afa47136bba Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Mon, 17 Jul 2023 15:06:33 +0200 Subject: [PATCH] fix pacman mirror --- usr/lib/archboot/installer/autoconfiguration.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr/lib/archboot/installer/autoconfiguration.sh b/usr/lib/archboot/installer/autoconfiguration.sh index e4623a70e..8532de698 100644 --- a/usr/lib/archboot/installer/autoconfiguration.sh +++ b/usr/lib/archboot/installer/autoconfiguration.sh @@ -188,8 +188,9 @@ _auto_timesetting() { _auto_pacman_mirror() { # /etc/pacman.d/mirrorlist # add installer-selected mirror to the top of the mirrorlist - if [[ "${_SYNC_URL}" != "" ]]; then + if grep -q '^Server' /etc/pacman.d/mirrorlist; then _dialog --infobox "Enable pacman mirror on installed system..." 3 70 + _SYNC_URL=$(grep '^Server' /etc/pacman.d/mirrorlist | sed -e 's#.*\ ##g') #shellcheck disable=SC2027,SC2086 awk "BEGIN { printf(\"# Mirror used during installation\nServer = "${_SYNC_URL}"\n\n\") } 1 " "${_DESTDIR}"/etc/pacman.d/mirrorlist > /tmp/inst-mirrorlist mv /tmp/inst-mirrorlist "${_DESTDIR}/etc/pacman.d/mirrorlist"