2 Commits

Author SHA1 Message Date
juewuy
48705a0dd9 ~修复小闪存模式内核位置错乱的bug 2026-01-27 19:54:10 +08:00
juewuy
4a2a982c8d ~修复部分小米设备自启失败的bug 2026-01-27 19:33:31 +08:00
2 changed files with 7 additions and 1 deletions

View File

@@ -23,7 +23,9 @@ core_unzip() { #$1:需要解压的文件 $2:目标文件名
} }
core_find(){ core_find(){
if [ ! -f "$TMPDIR"/CrashCore ];then if [ ! -f "$TMPDIR"/CrashCore ];then
core_dir=$(find "$BINDIR"/CrashCore.* $find_para 2>/dev/null) [ -n "$(find "$CRASHDIR"/CrashCore.* $find_para 2>/dev/null)" ] &&
mv -f "$CRASHDIR"/CrashCore.* "$BINDIR"/
core_dir=$(find "$BINDIR"/CrashCore.* $find_para 2>/dev/null | head -n 1)
[ -n "$core_dir" ] && core_unzip "$core_dir" CrashCore [ -n "$core_dir" ] && core_unzip "$core_dir" CrashCore
fi fi
} }

View File

@@ -2,6 +2,10 @@
# Copyright (C) Juewuy # Copyright (C) Juewuy
CRASHDIR="$(uci get firewall.ShellCrash.path | sed 's/\/starts.*//')" CRASHDIR="$(uci get firewall.ShellCrash.path | sed 's/\/starts.*//')"
#防止提前自启
/etc/init.d/shellcrash disable
crontab -l | grep -v 'start_legacy_wd.sh shellcrash' | crontab -
#防止usb未加载
i=0 i=0
while [ ! -f "$CRASHDIR/configs/ShellCrash.cfg" ]; do while [ ! -f "$CRASHDIR/configs/ShellCrash.cfg" ]; do
[ $i -gt 20 ] && exit 1 [ $i -gt 20 ] && exit 1