From cd3d9f0c7639772ce914f4cda680c54e3e2227bd Mon Sep 17 00:00:00 2001 From: xunmi-pc <寻觅> Date: Wed, 3 Apr 2024 09:44:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=20=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E5=AE=9A=E5=88=B6/=E9=BE=99=E6=9E=B6=E6=9E=84/loongjet.sh=20?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=9A=84=E6=96=B0=E6=97=A7=E4=B8=96=E7=95=8C?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 定制/龙架构/loongjet.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/定制/龙架构/loongjet.sh b/定制/龙架构/loongjet.sh index aee9256..20c9015 100755 --- a/定制/龙架构/loongjet.sh +++ b/定制/龙架构/loongjet.sh @@ -19,7 +19,6 @@ TMP_ROOT=/tmp/xunmi # 读取系统架构和内核信息 readonly UNAME_M="$(uname -m)" -readonly UNAME_R="$(uname -r)" WorldType="新世界" # 加载系统信息 @@ -84,9 +83,6 @@ exist_file() { # 识别架构 Check_Arch() { case $UNAME_M in -# *x86_64*) -# TARGET_ARCH="amd64" -# ;; *loongarch64*) TARGET_ARCH="loong64" ;; @@ -114,7 +110,8 @@ Check_Distribution() { notice="我们尚未在此发行版上进行测试,默认使用新世界文件替换" ;; esac - if [[ $UNAME_R =~ ^4.19.0-.+ ]]; then + WorldNum=$(hexdump -s 48 -C /usr/bin/sh | head -n 1 | awk '{print $2}') + if [[ ${WorldNum} == "03" ]]; then WorldType="旧世界" fi Show ${sType} "检测到 ${ReleaseName} 发行版系统, 根据内核版本推断属于 -> ${WorldType} <- 系统 "