From ebada9f455ae5bcd93d42f423db08e311ec0c8b3 Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Fri, 1 May 2026 03:38:17 +0000 Subject: [PATCH] =?UTF-8?q?fix(install):=20=E4=BC=98=E5=8C=96=20Arch=20Lin?= =?UTF-8?q?ux=20=E4=BE=9D=E8=B5=96=E5=AE=89=E8=A3=85=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E9=87=87=E7=94=A8=20-S=20--needed=20=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E9=83=A8=E5=88=86=E6=9B=B4=E6=96=B0=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=8D=9F=E5=9D=8F=20(closes=20#42)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to @Bryan2333 for the pacman flag optimization and security improvements. --- core/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/install.sh b/core/install.sh index 7d3c6c2..33f4e3a 100755 --- a/core/install.sh +++ b/core/install.sh @@ -84,7 +84,7 @@ if [ ${#MISSING_CMDS[@]} -gt 0 ]; then service crond start >/dev/null 2>&1 elif command -v pacman >/dev/null 2>&1; then - # Arch Linux 系列 + # Arch Linux 系列 (采用 --needed 防重复,剥离 -y 防部分升级炸系统) pacman -S --needed --noconfirm curl jq cronie procps-ng python openssl >/dev/null 2>&1 mkdir -p /root/.cache/crontab 2>/dev/null systemctl enable cronie >/dev/null 2>&1 && systemctl start cronie >/dev/null 2>&1 @@ -96,7 +96,8 @@ if [ ${#MISSING_CMDS[@]} -gt 0 ]; then echo -e " Debian/Ubuntu: \033[36mapt-get update && apt-get install -y --no-install-recommends curl jq cron procps python3 openssl\033[0m" echo -e " CentOS/RHEL: \033[36myum install -y curl jq cronie procps-ng python3 openssl\033[0m" echo -e " Alpine Linux: \033[36mapk add --no-cache curl jq cronie procps python3 bash openssl\033[0m" - echo -e " Arch Linux: \033[36mpacman -Sy curl jq cronie procps-ng python openssl\033[0m" + # Arch 用户,如果出问题,应该用 -Syu 进行全系统安全更新 + echo -e " Arch Linux: \033[36mpacman -Syu --needed curl jq cronie procps-ng python openssl\033[0m" exit 1 fi