From 642ac95ae91cf9418ea77f37eb66d86506f96216 Mon Sep 17 00:00:00 2001 From: juewuy Date: Wed, 4 Feb 2026 19:28:15 +0800 Subject: [PATCH] =?UTF-8?q?~=E5=A2=9E=E5=8A=A0=E5=8D=95=E7=8B=AC=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E5=90=AF=E5=8A=A8=E6=97=A5=E5=BF=97=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/menus/4_setboot.sh | 14 +++++++++++++- scripts/menus/8_tools.sh | 1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/menus/4_setboot.sh b/scripts/menus/4_setboot.sh index e64d9233..9726dfd2 100644 --- a/scripts/menus/4_setboot.sh +++ b/scripts/menus/4_setboot.sh @@ -44,6 +44,7 @@ setboot() { content_line "4) 启用小闪存模式: \033[36m$(printf '%-4s' "$mini_clash")\033[0m ———用于闪存空间不足的设备" [ "${BINDIR}" != "$CRASHDIR" ] && content_line "5) 设置小闪存目录: \033[36m${BINDIR}\033[0m" btm_box "6) 自启网络检查: \033[36m$(printf '%-4s' "$network_check")\033[0m ———禁用则跳过自启时网络检查" \ + "7) 查看启动日志" \ "" \ "0) 返回上级菜单" read -r -p "请输入对应标号> " num @@ -231,7 +232,18 @@ setboot() { fi fi ;; - *) + 7) + if [ -s "$TMPDIR"/ShellCrash.log ]; then + line_break + echo "===========================================================" + grep -v '任务' "$TMPDIR"/ShellCrash.log + echo "===========================================================" + exit + else + msg_alert "\033[31m未找到相关日志!\033[0m" + fi + ;; + *) errornum ;; esac diff --git a/scripts/menus/8_tools.sh b/scripts/menus/8_tools.sh index 282b63a5..c887ab8a 100644 --- a/scripts/menus/8_tools.sh +++ b/scripts/menus/8_tools.sh @@ -501,6 +501,7 @@ log_pusher() { echo "===========================================================" cat "$TMPDIR"/ShellCrash.log echo "===========================================================" + exit else msg_alert "\033[31m未找到相关日志!\033[0m" fi