From 828fcad66f5cadf3ccc6ff64bf7470541afb0132 Mon Sep 17 00:00:00 2001 From: dhruvmistry2000 Date: Fri, 11 Oct 2024 16:05:21 +0530 Subject: [PATCH 1/2] using reflector --- core/tabs/system-setup/system-update.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/tabs/system-setup/system-update.sh b/core/tabs/system-setup/system-update.sh index c213156ac..41de001a8 100755 --- a/core/tabs/system-setup/system-update.sh +++ b/core/tabs/system-setup/system-update.sh @@ -6,23 +6,23 @@ fastUpdate() { case "$PACKAGER" in pacman) - $AUR_HELPER -S --needed --noconfirm rate-mirrors-bin + $AUR_HELPER -S --needed --noconfirm reflector - printf "%b\n" "${YELLOW}Generating a new list of mirrors using rate-mirrors. This process may take a few seconds...${RC}" + printf "%b\n" "${YELLOW}Generating a new list of mirrors using reflector. This process may take a few seconds...${RC}" if [ -s /etc/pacman.d/mirrorlist ]; then "$ESCALATION_TOOL" cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak fi - # If for some reason DTYPE is still unknown use always arch so the rate-mirrors does not fail + # If for some reason DTYPE is still unknown use always arch so the reflector does not fail dtype_local=${DTYPE} if [ "${DTYPE}" = "unknown" ]; then dtype_local="arch" fi - "$ESCALATION_TOOL" rate-mirrors --top-mirrors-number-to-retest=5 --disable-comments --save /etc/pacman.d/mirrorlist --allow-root ${dtype_local} + "$ESCALATION_TOOL" reflector --top-mirrors-number-to-retest=5 --disable-comments --save /etc/pacman.d/mirrorlist --allow-root ${dtype_local} if [ $? -ne 0 ] || [ ! -s /etc/pacman.d/mirrorlist ]; then - printf "%b\n" "${RED}Rate-mirrors failed, restoring backup.${RC}" + printf "%b\n" "${RED}Reflector failed, restoring backup.${RC}" "$ESCALATION_TOOL" cp /etc/pacman.d/mirrorlist.bak /etc/pacman.d/mirrorlist fi ;; From 621e7741d5b898de8fbac9fb66f2bb492f6fbbd3 Mon Sep 17 00:00:00 2001 From: Dhruv Mistry <68422844+dhruvmistry2000@users.noreply.github.com> Date: Sat, 12 Oct 2024 11:56:35 +0530 Subject: [PATCH 2/2] Update system-update.sh --- core/tabs/system-setup/system-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/system-setup/system-update.sh b/core/tabs/system-setup/system-update.sh index 41de001a8..0c8d86f5b 100755 --- a/core/tabs/system-setup/system-update.sh +++ b/core/tabs/system-setup/system-update.sh @@ -20,7 +20,7 @@ fastUpdate() { dtype_local="arch" fi - "$ESCALATION_TOOL" reflector --top-mirrors-number-to-retest=5 --disable-comments --save /etc/pacman.d/mirrorlist --allow-root ${dtype_local} + "$ESCALATION_TOOL" reflector -n 5 --save /etc/pacman.d/mirrorlist ${dtype_local} if [ $? -ne 0 ] || [ ! -s /etc/pacman.d/mirrorlist ]; then printf "%b\n" "${RED}Reflector failed, restoring backup.${RC}" "$ESCALATION_TOOL" cp /etc/pacman.d/mirrorlist.bak /etc/pacman.d/mirrorlist