~优化docker适配

~修复386内核没有被正确编译打包的bug
This commit is contained in:
juewuy
2025-12-16 17:38:17 +08:00
parent 6925328554
commit f720451c2e
3 changed files with 7 additions and 4 deletions

View File

@@ -174,9 +174,12 @@ setconfig() { #脚本配置工具
[ -f "/data/etc/crontabs/root" ] && systype=mi_snapshot #小米设备
[ -w "/var/mnt/cfg/firewall" ] && systype=ng_snapshot #NETGEAR设备
#容器内环境
grep -qE '/(docker|lxc|kubepods|crio|containerd)/' /proc/1/cgroup || [ -f /run/.containerenv ] || [ -f /.dockerenv ] && systype=container
grep -qE '/(docker|lxc|kubepods|crio|containerd)/' /proc/1/cgroup || [ -f /run/.containerenv ] || [ -f /.dockerenv ] && {
systype='container'
CRASHDIR='/etc/ShellCrash'
}
#检查环境变量
[ -z "$CRASHDIR" -a -n "$clashdir" ] && CRASHDIR=$clashdir
[ -z "$CRASHDIR" -a -n "$clashdir" ] && CRASHDIR="$clashdir"
[ -z "$CRASHDIR" -a -d /tmp/SC_tmp ] && setdir
#移动文件
mkdir -p ${CRASHDIR}