From f87e06022631e13fd86fbf696e856e457d9f4f7a Mon Sep 17 00:00:00 2001 From: fscarmen <62703343+fscarmen@users.noreply.github.com> Date: Fri, 27 May 2022 00:38:30 +0800 Subject: [PATCH] Update menu.sh --- menu.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/menu.sh b/menu.sh index 71cec65..2a3554c 100644 --- a/menu.sh +++ b/menu.sh @@ -1574,6 +1574,7 @@ proxy(){ ${PACKAGE_INSTALL[int]} nftables rpm -ivh Client_CentOS_8.rpm if [[ ! $(strings /lib64/libc.so.6) =~ 'GLIBC_2.28' ]]; then + CLIBC=1 wget -O /usr/bin/make https://github.com/fscarmen/warp/releases/download/Glibc/make wget https://github.com/fscarmen/warp/releases/download/Glibc/glibc-2.28.tar.gz tar -xzvf glibc-2.28.tar.gz @@ -1587,12 +1588,6 @@ proxy(){ cd ../.. rm -rf glibc-2.28* fi - - # 此处为处理 Running transaction test 不动和文字乱码问题 - export LANG="en_US.UTF-8";export LANGUAGE="en_US.UTF-8" - rm -rf /var/lib/rpm/__db* - yum clean all - rpm -v rebuilddb;; 8|9 ) rpm -ivh Client_CentOS_8.rpm;; esac @@ -1616,6 +1611,14 @@ proxy(){ else red " ${T[${L}85]} " fi + # 此处为处理 Running transaction test 不动和文字乱码问题 + if [ $CLIBC = 1 ]; then + export LANG="en_US.UTF-8";export LANGUAGE="en_US.UTF-8" + rm -rf /var/lib/rpm/__db* + yum clean all + rpm -v rebuilddb;; + fi + # 创建再次执行的软链接快捷方式,再次运行可以用 warp 指令,设置默认语言 mv -f menu.sh /etc/wireguard >/dev/null 2>&1 chmod +x /etc/wireguard/menu.sh >/dev/null 2>&1